feat(reusable-burndown): add rebase-stale job — auto-fix conflicting bot PRs#303
Merged
Conversation
… bot PRs New `rebase-stale` job runs at the start of every burndown run (in parallel with preflight). It finds all open `automation`-labeled PRs where GitHub reports mergeable=CONFLICTING, rebases each onto main, and force-pushes. If a rebase has unresolvable conflicts the PR gets labeled `status:conflict-unresolvable` and a comment instructs closing + re-dispatch. `triage` now waits for both `preflight` and `rebase-stale` so new dispatches always land on a clean base. A `continue-on-error` guard on the rebase step ensures unexpected git errors never block new task dispatch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rebase-stalejob runs in parallel withpreflightat the start of every burndown runautomation-labeled PRs wheremergeable == CONFLICTINGmainand force-pushesstatus:conflict-unresolvable+ posts a comment to close/re-dispatchtriagenowneeds: [preflight, rebase-stale]so new dispatch always sees a clean basecontinue-on-error: trueon the rebase step ensures unexpected git errors never block new task dispatchWhy
Bot PRs were piling up as
CONFLICTINGwith no automatic recovery. The only option was manual rebase or abandoning the PR. This makes conflict resolution fully automatic.Security notes
gh pr listoutput (bot-created refs), not user-controlled${{ github.event.* }}expressions — no injection vector--forcepush is safe: bot is the only committer to theseauto/*/draft/*branchesTest plan
status:conflict-unresolvablelabel appears🤖 Generated with Claude Code