Repository navigation
fix(release): run the deduper from a path that survives the checkout - #211
Merged
Merged
Conversation
The step failed on its first real run: Error: Cannot find module '.../scripts/dedupe-changelog.mjs' It checks out the release branch, and that branch is cut from whatever main was when release-please first opened the pull request - which predates the script. So it checked out a tree without its own script in it. Copy the script to $RUNNER_TEMP before touching the working tree, and run it from there. Rehearsing the step locally against the real release branch also turned up a second failure the first run never reached: `git checkout -` aborts with "Your local changes would be overwritten" when CHANGELOG.md is still dirty. It only switched back out of tidiness - step 2 works entirely through the API, with the script already copied out - so it no longer switches back at all. Verified by running the step verbatim against release-please--branches--main: 11 duplicates removed, commit created, exit 0. Co-Authored-By: Claude <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.
#210's step failed on its first real run — the wiring I flagged as untested.
It checks out the release branch, and that branch was cut from
3498f3a—before the script existed. So it checked out a tree without its own script
in it.
Fix: copy the script to
$RUNNER_TEMPbefore touching the working tree.A second bug, found by rehearsing properly
Rather than ship untested wiring twice, I replayed the step verbatim against the
real
release-please--branches--main. That surfaced a failure the first runnever got far enough to hit:
git checkout -aborts whileCHANGELOG.mdis dirty. It was only switchingback out of tidiness — step 2 runs entirely through the API with the script
already copied out — so it no longer switches back.
Verified
The step, run verbatim, against the actual release branch:
Note
The failure was contained, as designed: it runs after release-please, so #209
was still updated correctly — only the deduplication was skipped. #209 currently
has 73 changelog entries; merging this drops it to 62.
Touches a workflow, so it needs a maintainer to merge.
🤖 Generated with Claude Code