fix: switch conflict resolver from push to schedule trigger to save runner costs (#26690)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Keith Williams
2026-01-10 15:00:33 -03:00
committed by GitHub
co-authored by Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent f86a8dc93e
commit 46b1bc3365
@@ -1,9 +1,11 @@
name: Devin PR Conflict Resolver
on:
push:
branches:
- main
# Run every 5 minutes instead of on push to main.
# This saves runner costs by avoiding the 20-second sleep that was needed
# to wait for GitHub to compute mergeable status after merges to main.
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
inputs:
pr_number:
@@ -152,10 +154,7 @@ jobs:
}
if (unknownPRs.length > 0) {
console.log(`\n${unknownPRs.length} PRs have UNKNOWN mergeable status, waiting 20 seconds before retrying...`);
await new Promise(resolve => setTimeout(resolve, 20000));
console.log(`Retrying ${unknownPRs.length} PRs via REST API...`);
console.log(`\n${unknownPRs.length} PRs have UNKNOWN mergeable status, retrying via REST API...`);
for (const pr of unknownPRs) {
try {
@@ -181,7 +180,7 @@ jobs:
conflictingPRs.push(result.data);
if (result.isTargetPR) break;
} else if (result.unknown) {
console.log(`PR #${pr.number} still has UNKNOWN status after retry`);
console.log(`PR #${pr.number} still has UNKNOWN status, will be checked on next run`);
}
} catch (error) {
console.error(`Error retrying PR #${pr.number}: ${error.message}`);