Repository navigation
Fix #195: make TAG_VERSION_PATTERN's tag prefix configurable - #202
Merged
Merged
Conversation
Add nisse.source.jgit.tagPrefix property to allow projects with non-standard tag formats (e.g. jline-3.28.0, camel-4.8.0) to configure the prefix used when matching version tags. When empty (default), the existing v? behavior is preserved. When set (e.g. tagPrefix=jline-), only tags with that prefix are matched. Also log at INFO level when tags exist but none match the configured pattern, with a hint about the tagPrefix property. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedNext included review available in 21 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add testUnmatchedTagsFallbackToDefault which creates a repo with multiple non-standard tags (release-1.0.0, camel-2.0.0) and verifies: - without tagPrefix, version falls back to 0.1.0 (the INFO log path) - with tagPrefix=camel-, the correct tag is resolved Co-Authored-By: Claude Opus 4.6 <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.
Summary
nisse.source.jgit.tagPrefixproperty to configure the tag prefix used when matching version tags. Default is empty (preserving the existingv?behavior). Setting it to e.g.jline-matches tags likejline-3.28.0.tagPrefixproperty. This addresses the silent fallback to0.1.0that confused new adopters.buildTagVersionPattern()and integration tests verifying dynamic version resolution with prefixed tags.Test plan
testBuildTagVersionPatternDefault— verifies empty/null prefix returns the originalTAG_VERSION_PATTERNtestBuildTagVersionPatternCustomPrefix— verifiesjline-,release-,camel-prefixes match correctlytestBuildTagVersionPatternWithQualifier— verifies qualifier extraction (e.g.-rc1) still works with custom prefixtestTagPrefixDynamicVersion— end-to-end: without prefix falls back to0.1.0, withtagPrefix=jline-resolves fromjline-1.0.0tagtestTagPrefixExactMatch— HEAD is on a prefixed tag, version resolves exactlyCloses #195
🤖 Generated with Claude Code