Skip to content

Commit c6972f6

Browse files
ci: fix Comment PR Artifacts timeout and avoid duplicate build triggers
The Comment PR Artifacts workflow was timing out after ~12 minutes (30 iterations × 10s sleep) while PR Build Validation runs regularly take 17+ minutes, causing most PRs to show a failing CI check. Changes: - Increase comment workflow polling to 60 iterations × 20s sleep (~20 min max) so it reliably waits for the full build to complete. - Remove the 'edited' trigger from pr-build.yml to prevent duplicate build runs when a PR title/body is edited. Editing a PR should not rebuild; only code changes (synchronize) and lifecycle events need builds. This also prevents the comment workflow from finding a newer in-progress run when a completed one already exists. Co-authored-by: openhands <openhands@all-hands.dev>
1 parent d33a041 commit c6972f6

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/comment-pr-artifacts.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ jobs:
5959
6060
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
6161
62+
const maxAttempts = 60;
63+
const pollIntervalMs = 20_000;
64+
6265
let matchedRun = null;
63-
for (let attempt = 1; attempt <= 30; attempt += 1) {
66+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
6467
const runs = await github.paginate(github.rest.actions.listWorkflowRuns, {
6568
owner,
6669
repo,
@@ -78,8 +81,8 @@ jobs:
7881
break;
7982
}
8083
81-
core.info(`Waiting for PR Build Validation run for ${headSha} (attempt ${attempt}/30)`);
82-
await sleep(10000);
84+
core.info(`Waiting for PR Build Validation run for ${headSha} (attempt ${attempt}/${maxAttempts})`);
85+
await sleep(pollIntervalMs);
8386
}
8487
8588
if (!matchedRun) {

.github/workflows/pr-build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
pull_request:
55
types:
66
- opened
7-
- edited
87
- synchronize
98
- reopened
109
- ready_for_review

0 commit comments

Comments
 (0)