chore(ci): drop co-incident tags in backfill-release-notes so it picks the right baseline#5321
Merged
Merged
Conversation
semantic-release's lastRelease picker accepts both prerelease tags on the branch's channel and stable tags via the prerelease filter's stable-fallback clause, then sorts by semver. When a stable and a beta share a commit (e.g. v2.100.0 and v2.100.0-beta.2 both at 9a22aff), the stable wins the sort - and since it points at HEAD, there are 0 commits and the script errors with "did not compute a next release". Delete every local tag that points at the target tag's commit, not just the target itself. Co-located tags are by definition the same release, and dropping them lets semantic-release fall back to the genuine prior release on the channel (v2.100.0-beta.1 in the example).
jgoux
approved these changes
May 20, 2026
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.
Fixes
bun apps/cli/scripts/backfill-release-notes.ts --tag v2.100.0-beta.2, which currently errors withsemantic-release did not compute a next release for v2.100.0-beta.2.Why it fails today
semantic-release's
lastReleasepicker accepts both prerelease tags on the branch's channel and stable tags via the prerelease filter's stable-fallback clause, then sorts the survivors by semver. When a stable and a beta share a commit (e.g.v2.100.0andv2.100.0-beta.2are both at9a22aff6), the stable wins the sort — and since it points at HEAD itself, semantic-release reports "Found 0 commits since last release" and emits nonextRelease. The script's version-mismatch guard then exits with the "did not compute a next release" error.Fix
After resolving the target tag's commit, delete every local tag that points at that commit, not just the target. Co-located tags are by definition the same release, and dropping them lets semantic-release fall back to the genuine prior release on the channel (
v2.100.0-beta.1in the example).Sample output (
v2.100.0-beta.2)Regression-checked locally that
v2.99.0-beta.2(where stable and beta are on different commits) andv2.100.1(stable backfill) still produce the same output as before.Generated by Claude Code