fix(needs-rebase): retry mergeable check on push events to catch conflicting PRs (#1240)

With maxAttempts=1, all PRs have mergeable=null immediately after a push
and are skipped. PRs that are never subsequently updated (no new commits,
no re-opens) never get rechecked. Increasing to 3 attempts (5s + 10s backoff)
gives GitHub ~15s to compute mergeability before giving up.

Signed-off-by: Paige Patton <prubenda@redhat.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paige Patton
2026-04-21 14:09:46 -04:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent 7ba07f142f
commit c759a98f9a
+1 -1
View File
@@ -168,7 +168,7 @@ jobs:
for (let i = 0; i < prs.length; i += CONCURRENCY) {
const batch = prs.slice(i, i + CONCURRENCY);
await Promise.all(batch.map(pr =>
handlePR(pr.number, pr.user.login, 1).catch(e =>
handlePR(pr.number, pr.user.login, 3).catch(e =>
core.warning(`PR #${pr.number}: unexpected error — ${e.message}`)
)
));