fix(release-settle): supersede a previous settle PR instead of force-pushing its branch - #36
Merged
Merged
Conversation
…pushing its branch Re-running settle on a moved release tip force-pushed the existing chore/release-settle-vX.Y.Z branch to refresh the open PR. A repository ruleset that bans force pushes on every branch (stateless-validator has one) rejects that, and the run fails after the guard. The settle PR is a statement about one commit, so a new commit now gets a new PR: the open one is closed with the reason, the branch is dropped, and the new branch is pushed fresh — no force push anywhere. Co-Authored-By: Claude Fable 5.1 <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.
Seen live on stateless-validator today: re-running settle for v2.0.18 after
release-v2.0.18moved (megaeth-labs/stateless-validator#209) failed at the push withGH013 … Cannot force-push to this branch. The repository has a "ban force push" ruleset on~ALLbranches, so the action'sgit push --forcerefresh of the existingchore/release-settle-v2.0.18branch can never succeed there. The same class of problem hit the candidate branch earlier (#33).Fix: a settle PR is a statement about one commit, so a re-run now supersedes rather than refreshes. If the settle branch already exists, the action closes any open settle PR on it with the reason, deletes the branch (a plain ref delete, allowed where force-push is not), and pushes the new branch fresh. No force push remains in the action. The
existing → gh pr editpath is gone with it; the PR body now says a re-run closes it and opens a fresh one, and the README table says the same.For today's release I did the same steps by hand (closed #208, deleted the branch, re-dispatched), which produced megaeth-labs/stateless-validator#211; this PR makes the action do it.
Not changed here:
release-candidate's stale-branch step still letscreate-pull-requestupdate a candidate branch that has an open PR, which is also a force push and would fail under the same ruleset ifproposewere re-dispatched for a version whose candidate PR is still open. That path has not been hit; flagging it rather than widening this fix.🤖 Generated with Claude Code