Repository navigation
fix(release): decide direct merge of release PRs from the REST merge state - #83
Merged
Merged
Conversation
…state Refs #80 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 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.
Summary
The release-PR arming script decides whether to merge a PR directly from its REST
mergeable_stateinstead of matching the English text of GitHub's refusal. Refs #80.Changes
clean statustext match. When the auto-merge mutation fails, the script re-readsGET /pulls/{n}:clean→ direct squash merge (pinned head, exact title) as before;unknown(computed asynchronously) → re-read up to 5 times, 2 s apart; any other state, or a head that moved, fails with the state in the message.arm(..., sleep=time.sleep)is injectable for tests.Fixed) updated.Test plan
python3 -m unittest release/test_arm_release_pr_auto_merge.py: 18 tests pass, including new cases for clean state whatever the error text, unknown then clean, blocked, bounded unknown reads, and a moved head.actionlint -config-file .github/actionlint.yaml: clean.releasediscovery: 3test_python_artifactfailures that come from the local environment (No module named build), not from this change.Screenshots
N/A
Risk
Intent
change, depth standard: the script merges release PRs, but it stays fail-closed (onlycleanmerges, the head stays pinned). A refusal that no longer says "clean status" now still merges when the PR is clean; unrelated refusals on non-clean PRs fail as before.How to revert
Revert the squash commit.
Deployment notes
None. Target branch
main; callers receive it with the next v6 release.🤖 Generated with Claude Code