Skip to content

fix(release-settle): supersede a previous settle PR instead of force-pushing its branch - #36

Merged
Troublor merged 1 commit into
mainfrom
troublor/release-settle-supersede
Sep 9, 2026
Merged

Troublor merged 1 commit into
mainfrom
troublor/release-settle-supersede

Conversation

@Troublor

@Troublor Troublor commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Seen live on stateless-validator today: re-running settle for v2.0.18 after release-v2.0.18 moved (megaeth-labs/stateless-validator#209) failed at the push with GH013 … Cannot force-push to this branch. The repository has a "ban force push" ruleset on ~ALL branches, so the action's git push --force refresh of the existing chore/release-settle-v2.0.18 branch 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 edit path 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 lets create-pull-request update a candidate branch that has an open PR, which is also a force push and would fail under the same ruleset if propose were 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

…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>
@Troublor
Troublor merged commit 22c0fce into main Sep 9, 2026
2 checks passed
@Troublor
Troublor deleted the troublor/release-settle-supersede branch September 9, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant