fix: use --unreleased --bump (not --latest --bump) so version actually bumps - #16
Merged
Merged
Conversation
…y bumps PR #15's "fix" for the full-history regression was wrong. I added `--latest` thinking it would filter the cliff context to just the bumped release; what it actually does in combination with `--bump` is return the latest EXISTING tag and silently drop the bump. Result: PR #15's merge ran the workflow successfully but computed `next: v1.4.2` (the existing tag), said "no releasable commits", and skipped tagging. We never got the v1.4.3 release that should have validated #15 itself. The right flag is `--unreleased --bump --context`: --unreleased : filter to commits not yet in any tag --bump : compute the bumped version from those commits --context : output as JSON Together they produce a single-release JSON for just the bumped version. Verified locally on a fresh clone at the PR #15 merge commit: returns `v1.4.3` (correct), one element in the JSON, renders cleanly with just the new release's bullets + Full Changelog footer. Acknowledging: this is the second swing at the same regression (originally introduced in #13, mis-fixed in #15). Lesson: end-to-end local testing on a fresh clone with the real tag history would have caught both issues immediately.
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
Apologies — second swing at the same regression. PR #15's "fix" silently broke the bump computation. After #15 merged, the workflow ran successfully but said `No releasable commits since v1.4.2` and skipped tagging. We never got the v1.4.3 release that should have validated #15 itself.
What went wrong (again)
--latest --bumplooked like the right composition to me — "latest release + bump". It isn't. With both flags, git-cliff returns the latest existing tag and silently ignores the bump. Sooutputs.versionwas always the current tag and the decide step always said "skip".Verified locally:
Fix
One word again. Replace
--latestwith--unreleased:--unreleasedfilters to commits not yet in any tag →--bumpcomputes the version from those →--contextoutputs as JSON. Returns a single-release JSON containing just the bumped version. Render is then trivially correct.Updated the explanatory comment in the YAML to call out the trap so the next person to look at this doesn't make the same mistake. Both
--latestand--unreleasedlook like single-release filters; only one composes with--bump.Lesson learned
I missed this in local testing because my reproduction setup wasn't representative of the production state. A fresh clone with the actual remote tag history (which I finally did when debugging this) reveals the issue immediately. Going forward, validation needs to happen on a fresh clone at the same commit the workflow would run from.
Test plan
--unreleased --bump --contextreturns v1.4.3 with one release in JSON; render produces clean single-release notes.fix:→ patch bump from v1.4.2)Cleanup follow-up
v1.4.1 and v1.4.2 still have bloated bodies (from PR #13's original regression). Those will stay until manually corrected via
gh release edit— fixing the workflow doesn't retroactively rewrite history. Happy to do that cleanup after this lands and we confirm v1.4.3 is clean.