Repository navigation
tools: Block auto-merge on reviews and recent pushes - #1579
Merged
Merged
Conversation
The auto-merge script only looked at issue comments, so a pending "request changes" review, or any other pull request review, did not stop a merge; branch protection does not require reviews either. Now a change request blocks until the reviewer approves or it is dismissed, and comment reviews block like issue comments unless marked [noblock]. The minimum age was measured from PR creation, but scan-for-updates force-pushes newer versions onto existing PRs, so a freshly updated PR could be merged while its CI was still running. Also require the head commit to be old enough, and require the "Package tests passed" gate check to be present, not just every reported required check to pass. Assisted-by: Claude Code (Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The auto-merge script only read issue comments, so a "request changes" review (or any other PR review) did not stop a merge, and branch protection on
maindoes not require reviews. Now a change request blocks until the reviewer approves or it is dismissed, and comment reviews (including inline comments) block like issue comments unless marked[noblock].The minimum age was measured from PR creation, but
scan-for-updatesforce-pushes newer versions onto existingautomatic/*branches, so a freshly updated PR could be merged while its CI was still running. The head commit must now also be at least the minimum age old, and thePackage tests passedgate check must be present and passing.A dry run against this repository reports #1570 as blocked by its pending change request; the old script only skipped it because its tests fail.
AI disclosure: Claude Code (Claude Opus 5.5) analysed the existing setup and wrote the code, tests and this description; reviewed by a human.
🤖 Generated with Claude Code