feat: support commit message increment overrides - #5123
Open
fzlzjerry wants to merge 1 commit into
Open
Conversation
Comment on lines
+459
to
+465
| if (item is not BaseVersionOperator | ||
| || context.IncrementOverride != VersionField.None | ||
| || !hasBaseVersionOperator) | ||
| { | ||
| yield return item; | ||
| } | ||
|
|
fzlzjerry
force-pushed
the
feat/4144-version-bump-override
branch
from
August 12, 2026 13:13
8aa4108 to
c2c96fb
Compare
fzlzjerry
force-pushed
the
feat/4144-version-bump-override
branch
from
August 12, 2026 13:22
c2c96fb to
09cd27c
Compare
|
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.



Description
Add a configurable
override-version-bump-messagepattern with the default=semver:\s?(?<increment>none|patch|minor|major)for the GitFlow, GitHubFlow,and TrunkBased workflows.
The new message can lower or raise the configured branch increment. Range-based
strategies reset the accumulated commit-message increment when they encounter an
override, while Mainline applies the override at that commit and preserves the
expected version-source distance behavior from the issue scenarios.
This also updates effective configuration output, CLI overrides, the 7.0 schema,
workflow snapshots, and the configuration and version-increment documentation.
Related Issue
Resolves #4144
Motivation and Context
Regular
+semvermessages treat the configured branch increment as a minimum,so they cannot lower a Patch branch to None for documentation-only changes. The
new
=semverform provides an explicit override without changing the existing+semverbehavior.How Has This Been Tested?
dotnet build src/GitVersion.slnx --no-restore --disable-build-servers -m:1(0 errors with .NET SDK 10.0.400; the one
MSB3277warning also reproduceson
origin/main)dotnet test --solution src/GitVersion.slnx --no-build --max-parallel-test-modules 1(37,003 passed across all six test modules)
dotnet format src/GitVersion.slnx --verify-no-changes --no-restorenpx remarkwith the four changed Markdown files and the repository's lint configurationThe integration coverage includes all eight acceptance scenarios from the
issue, all four override values across the three built-in workflows, same-commit
precedence, custom patterns, disabled commit-message incrementing, and invalid
capture values/configuration.
Screenshots (if appropriate):
Not applicable.
Checklist: