Repository navigation
Take only v-prefixed semantic version tags as releases [patch] - #248
Merged
Merged
Conversation
GetTagsAsync returned every tag, and the version calculator and changelog took the first as the last release. A wip-* tag sorts ahead of every v* tag, and an ios-v* tag is all a shallow tag-triggered checkout sees, so a stray tag moved the version backwards or turned it into the tag's name, exit 0. GetTagsAsync now keeps only tags matching v<major>.<minor>.<patch> with an optional prerelease suffix. IsCommitTaggedAsync applies the same rule, so an ios-v* or wip-* tag on the commit no longer suppresses its release. Fixes #217 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PDfKv3rGKy33VQUkrTckdA
|
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 #217
Summary
GetTagsAsyncreturned every tag, andVersionCalculatorandChangelogGeneratortooktags[0]as the last release. Awip-*tag sorts ahead of everyv*tag, and anios-v*tag is all a shallow tag-triggered checkout sees. Either one moved the version backwards (1.4.0 → 1.0.0) or turned the version into the tag name, and the run still exited 0.GitService.GetTagsAsyncnow keeps only tags matching^v\d+\.\d+\.\d+(?:-[0-9A-Za-z.]+)?$(GitService.IsVersionTag). It filters after listing, so the sort arguments are unchanged. Both callers, the version calculator and the changelog's previous-tag lookup, get the fix through this one method.GitService.IsCommitTaggedAsync: decision for the issue's open checkbox. It now applies the same rule, so only a version tag on the commit marks it as already released. Anios-v*orwip-*tag no longer suppresses the release. It parsesshow-ref -dlines and peels^{}, instead of searching the whole output for the hash as a substring. If you'd rather keep "any tag suppresses", revert that one hunk.Tests (all in
GitServiceTests)[x-marker, wip-spike, v1.4.0, ios-v1.2.0, v1.4.0-rc.1, v1.3, v1.3.0]givesv1.4.0, v1.4.0-rc.1, v1.3.0. A list of onlyios-v*tags gives an empty list.VersionCalculator:v1.3.0,v1.4.0, thenwip-spikeandios-v1.2.0on a later commit gives last tagv1.4.0. A repository whose only tag isios-v1.2.0falls back tov1.0.0-pre.0, andIsCommitTaggedAsyncreports it as not released.IsCommitTaggedAsync: a non-version tag on the commit gives false. A peeled annotated version tag gives true.main'sGitService.cs. The full suite passes: 875 passed, 0 failed.🤖 Generated with Claude Code
https://claude.ai/code/session_01PDfKv3rGKy33VQUkrTckdA
Generated by Claude Code