Repository navigation
sync_all_siblings: optional --auto-merge for update --pr - #32
Merged
Merged
Conversation
With --auto-merge, each new sync PR gets `gh pr merge --auto --squash`, so it merges itself once the sibling's CI passes. Off by default; only with --pr. It never fails a sibling (the PR is open either way) and says in the status table why it didn't turn auto-merge on: - the repo has "Allow auto-merge" off (allow_auto_merge from the REST API); - the default branch requires no status checks, from classic protection or rulesets: GitHub's auto-merge would then merge at once, before CI ran; - the required checks can't be read (a 404 from branch protection just means "not protected"); - `gh pr merge` refused, with its message. When it is on, the row names the checks it waits for. Today all nine siblings have auto-merge off and require no checks (checked against the API), so the flag would skip every one of them; README says what it takes. Refs #16 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.
Refs #16 (optional
--auto-mergeforsync_all_siblings.py update --pr).Change
update --pr --auto-mergerunsgh pr merge <url> --auto --squashon each new sync PR. It is off by default, and argparse refuses it without--pr. It never fails a sibling, because the PR is open either way. The status row says what happened:auto-merge on (squash, once test (3.11), alpine pass)allow_auto_merge: false)auto-merge skipped: turned off for the repo (Settings > General > Allow auto-merge)auto-merge skipped: main requires no status checks, so it would merge before CI ranauto-merge skipped: couldn't read main's required checks (…)gh pr mergerefusesauto-merge failed (<gh's message>)Not touched: a sync PR that was already open (the "PR already open" skip).
Current state of the siblings (read from the API today)
All nine have "Allow auto-merge" off and no required checks (no branch protection, no rulesets). So the flag would currently skip every sibling, which is the safe outcome. To use it, each sibling needs:
mainrequiring the CI jobs (e.g.test (3.11)…test (3.14),alpine,shared-drift); andI haven't changed any repo settings. Say if you want that as part of C2.
Tests
gh pr merge … --auto --squashruns for exactly the three where it should.--commit/--pushwith--auto-mergeare refused.required_checks()and theallow_auto_mergelookup were also run against the realmcp-server-onkyo:[]andfalse, matching the fake.🤖 Generated with Claude Code