Repository navigation
Diff a -pre.1 changelog entry against the previous tag, not the stable release after it [patch] - #180
Merged
Merged
Conversation
…e release after it [patch] FindSearchTag looked for "prerelease 0" when resolving the range for vX.Y.Z-pre.1. A stable vX.Y.Z tag parses to the same key, so once the stable release was tagged the -pre.1 entry was diffed against it, got an empty range, and read "No significant changes detected since vX.Y.Z". The first prerelease of a series now diffs against the adjacent earlier tag. Fixes #156 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KV83HNRiTm3h4n1KgMkdqX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KV83HNRiTm3h4n1KgMkdqX
|
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 #156
What was wrong
To resolve the range for a
vX.Y.Z-pre.1entry,ChangelogGenerator.FindSearchTaglooked for "prerelease 0", the keyX.Y.Z.0. A stablevX.Y.Ztag parses to that same key. Once the stable release is tagged, the-pre.1entry was diffed against it, the rangevX.Y.Z..vX.Y.Z-pre.1came out empty, and the entry read "No significant changes detected since vX.Y.Z".Change
When
toPrerelease == 1,FindSearchTagnow returnsfromTag, the adjacent earlier tag. With that path gone, the prerelease search only ever looks forN-1 >= 1, so it can no longer match a stable tag.-pre.2and later still diff against the previous prerelease.As the maintainer decision on the issue says, the wrong entries in existing committed
CHANGELOG.mdfiles need no hand cleanup.Tests
GenerateAsync_FirstPrereleaseListsCommitsSinceThePreviousTagOnceItsStableTagExistscovers the acceptance-criteria history:v1.0.0, then "Add feature A" taggedv1.0.1-pre.1, then "Fix bug B" taggedv1.0.1. Thev1.0.1-pre.1entry must list "Add feature A" sincev1.0.0. With the fix reverted, this test fails.GenerateAsync_LaterPrereleaseDiffsAgainstThePreviousPrereleaseis a regression guard:v1.0.1-pre.2still diffs againstv1.0.1-pre.1.dotnet test: 762/762 passed. The Sonar-local build reports no new warnings inChangelogGenerator.cs.This PR and #179 (for #157) both touch
ChangelogGenerator.csandChangelogGeneratorTests.cs, but in different places. They should merge in either order without conflicts.🤖 Generated with Claude Code
https://claude.ai/code/session_01KV83HNRiTm3h4n1KgMkdqX
Generated by Claude Code