ci: fetch full history before amending the release commit - #269
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4 tasks
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
Fixes the bug that just destroyed release PR #245. The
sign-release-branchjob from #268 used the default shallow checkout (fetch-depth: 1):git commit --amendin a clone whose parent objects are behind the shallow boundary rewrote the release commit into a parentless orphan containing the whole repo tree (181 files, hence the size/xl relabel). Force-pushing that orphan left the release branch with no common ancestor with master, so GitHub auto-closed #245 as unmergeable — attributed to silverhand-bot, whose PAT pushed it.Two changes:
fetch-depth: 0on the checkout, so the amend keeps the commit's parent;%P, abort instead of pushing — a history rewrite must never reach the branch again, whatever the cause.Recovery
No manual branch surgery needed — merging this PR is the recovery: the master push makes release-please notice its PR is closed, force-push a fresh, correctly-parented release commit over the orphan, and open a new
release: 3.0.0-betaPR; that push then triggers the fixed sign job, which amends it with the bot's GPG key. The new release PR should come up green and Verified, ready to merge.Testing
c693c58hasparents: []and the full tree as its diff, exactly what a shallow amend produces.git log -1 --format=%Pempty on orphan, non-empty otherwise) is the direct negation of the corruption.Checklist
.changeset(N/A — release-please)🤖 Generated with Claude Code