Skip to content

Fix next-version parsing with tag prefix - #5236

Open
Voyagerroc-Lab wants to merge 1 commit into
GitTools:mainfrom
Voyagerroc-Lab:fix-next-version-independent-of-tag-prefix
Open

Voyagerroc-Lab wants to merge 1 commit into
GitTools:mainfrom
Voyagerroc-Lab:fix-next-version-independent-of-tag-prefix

Conversation

@Voyagerroc-Lab

@Voyagerroc-Lab Voyagerroc-Lab commented Sep 20, 2026

Copy link
Copy Markdown

What changed\n- Parse configured

ext-version independently of the Git tag prefix.\n- Add an integration regression test for
ext-version: 1.2.3 with ag-prefix: project-a/.\n\nValidation: the focused regression and tag-prefix integration tests pass; dotnet build and formatting verification pass.\n\nFixes #5228

Summary by CodeRabbit

  • Bug Fixes
    • Configured next versions are now recognized correctly even when the repository uses a tag prefix.
    • Next versions retain the expected semantic version format, including the commit-based suffix.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7e4b5bd6-c027-4dce-9f15-5bc0c82f9282

📥 Commits

Reviewing files that changed from the base of the PR and between e7c2d35 and aed692d.

📒 Files selected for processing (2)
  • src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs
  • src/GitVersion.Core/VersionCalculation/VersionSearchStrategies/ConfiguredNextVersionVersionStrategy.cs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The version strategy now parses NextVersion without the configured tag prefix. An integration test verifies that 1.2.3 produces 1.2.3-1 with a project-a/ tag prefix pattern.

Changes

NextVersion tag prefix handling

Layer / File(s) Summary
Independent NextVersion parsing and integration coverage
src/GitVersion.Core/VersionCalculation/VersionSearchStrategies/ConfiguredNextVersionVersionStrategy.cs, src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs
NextVersion is parsed without the configured tag prefix pattern. An integration test verifies the behavior after one commit with a non-matching prefix.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: arturcic

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing configured next-version parsing when a tag prefix is present.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant