Skip to content

feat: support version bump reset messages - #5123

Merged
mergify[bot] merged 5 commits into
GitTools:mainfrom
fzlzjerry:feat/4144-version-bump-override
Aug 15, 2026
Merged

feat: support version bump reset messages#5123
mergify[bot] merged 5 commits into
GitTools:mainfrom
fzlzjerry:feat/4144-version-bump-override

Conversation

@fzlzjerry

@fzlzjerry fzlzjerry commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Add a configurable version-bump-reset-message pattern with the default
=semver: for the GitFlow, GitHubFlow, and TrunkBased workflows.

The default major, minor, patch, and no-bump patterns now accept either +semver
or =semver. Those existing patterns select the increment value; a matching
reset message discards increments accumulated before that commit and suppresses
the configured branch increment. The existing +semver minimum-increment
behavior is unchanged.

Reset detection is centralized in IncrementStrategyFinder and exposed through
CommitMessageIncrement. Range-based strategies scan from the newest commit,
consolidate newer bump messages, and stop at the first reset. Mainline clears its
accumulated increment at the reset commit and keeps the branch increment
suppressed until the current mainline segment ends.

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 +semver messages treat the configured branch increment as a minimum,
so they cannot lower a Patch branch to None for documentation-only changes. The
new =semver reset form can suppress that branch increment without changing the
behavior of existing +semver messages.

How Has This Been Tested?

  • dotnet test ./src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj --no-restore
    (36,211 passed)
  • dotnet test ./src/GitVersion.Configuration.Tests/GitVersion.Configuration.Tests.csproj --no-restore
    (100 passed)
  • dotnet test ./src/GitVersion.App.Tests/GitVersion.App.Tests.csproj --no-restore
    (356 passed)
  • dotnet format ./src/GitVersion.slnx --verify-no-changes --no-restore
  • git diff --check

The Core integration coverage includes all eight acceptance scenarios from the
issue, all four reset values across the three built-in workflows, a custom reset
pattern, disabled commit-message incrementing, the requested merged-branch
regression, newest-first traversal stopping at the most recent reset, and a
malformed reset marker without a valid increment (32 focused cases).

Screenshots (if appropriate):

Not applicable.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copilot AI lite review requested due to automatic review settings August 12, 2026 06:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.

@arturcic
arturcic requested a review from HHobeck August 12, 2026 11:59
Copilot AI review requested due to automatic review settings August 12, 2026 13:13
@fzlzjerry
fzlzjerry force-pushed the feat/4144-version-bump-override branch from 8aa4108 to c2c96fb Compare August 12, 2026 13:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fzlzjerry
fzlzjerry force-pushed the feat/4144-version-bump-override branch from c2c96fb to 09cd27c Compare August 12, 2026 13:22
@arturcic

Copy link
Copy Markdown
Member

@fzlzjerry please rebase your branch onto main (do not merge main into your branch)

@arturcic

Copy link
Copy Markdown
Member

hey @HHobeck mind to have a look?

@fzlzjerry
fzlzjerry force-pushed the feat/4144-version-bump-override branch from 09cd27c to ac9717d Compare August 14, 2026 13:23
Copilot AI review requested due to automatic review settings August 14, 2026 13:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fzlzjerry

Copy link
Copy Markdown
Contributor Author

@arturcic Rebased onto current main (7505ddb6f) without a merge commit and force-updated the branch. I also clarified why a null increment override must preserve normal operator processing. Local checks: 36,215 Core tests, 101 Configuration tests, 356 App tests, and dotnet format --verify-no-changes all pass.

@fzlzjerry
fzlzjerry force-pushed the feat/4144-version-bump-override branch 2 times, most recently from ac9717d to 287cfc5 Compare August 14, 2026 13:54

@HHobeck HHobeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work on this! I’ve left a few comments for your consideration.

Comment thread src/GitVersion.Core/VersionCalculation/Mainline/MainlineContext.cs Outdated
Comment thread src/GitVersion.Core/VersionCalculation/Mainline/EnrichIncrement.cs Outdated
Comment thread docs/input/docs/workflows/GitFlow/v1.yml Outdated
Copilot AI review requested due to automatic review settings August 14, 2026 14:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 14, 2026 14:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fzlzjerry fzlzjerry changed the title feat: support commit message increment overrides feat: support version bump reset messages Aug 14, 2026
@fzlzjerry

Copy link
Copy Markdown
Contributor Author

The new CI run is green except for Test / macos-26 - net10.0 - libgit2 again. All three built-in retry attempts failed in different GitVersion.MsBuild.Tests cases with the same ArgumentNullException (BuildEventContext) from ParallelConsoleLogger / MsBuildPipeLogger; every other test module in those attempts passed. The previous head failed in the same job with the same exception, while the other platforms, format, docs, CodeQL, and Sonar checks pass. I do not have upstream Actions admin permission to rerun it. @arturcic, could you please rerun job 94801513682?

@fzlzjerry

Copy link
Copy Markdown
Contributor Author

@HHobeck I reworked this around the reset/baseline model in 97edd62 and replied to all four review threads. MainlineContext now only stores SuppressBranchIncrement, the MainlineVersionStrategy iteration is unchanged from main, and the option is version-bump-reset-message. The focused scenarios and full Core suite pass. Would you mind taking another look?

@arturcic

Copy link
Copy Markdown
Member

The new CI run is green except for Test / macos-26 - net10.0 - libgit2 again. All three built-in retry attempts failed in different GitVersion.MsBuild.Tests cases with the same ArgumentNullException (BuildEventContext) from ParallelConsoleLogger / MsBuildPipeLogger; every other test module in those attempts passed. The previous head failed in the same job with the same exception, while the other platforms, format, docs, CodeQL, and Sonar checks pass. I do not have upstream Actions admin permission to rerun it. @arturcic, could you please rerun job 94801513682?

please rebase on main again - it should be fixed

Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs Outdated
Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs Outdated
Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs
Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs Outdated
Comment thread src/GitVersion.Core/VersionCalculation/Mainline/EnrichIncrement.cs Outdated
Comment thread src/GitVersion.Core/VersionCalculation/Mainline/EnrichIncrement.cs Outdated
Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs Outdated
Copilot AI review requested due to automatic review settings August 15, 2026 06:44
@fzlzjerry
fzlzjerry force-pushed the feat/4144-version-bump-override branch from 97edd62 to 8d87db3 Compare August 15, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fzlzjerry

Copy link
Copy Markdown
Contributor Author

@arturcic Rebased onto current main (c5aa98937), including the MSBuild pipe logger fix from #5138, without a merge commit. The updated head is 8d87db300. The focused reset scenarios and the full Core, Configuration, and App suites pass locally.

@fzlzjerry

Copy link
Copy Markdown
Contributor Author

@HHobeck I addressed all seven follow-up threads in 8d87db300, including the exact 1.0.1-4 regression scenario and newest-first reset traversal coverage. All focused and full local suites pass. Would you mind taking another look?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

Suppressed comments (1)

docs/input/docs/reference/version-increments.md:69

  • Inline code span is split across a newline ( `=semver: on one line and patch on the next), which can render incorrectly in Markdown. Keep each =semver: … example on a single line.
The configured branch increment acts as the minimum for these `+semver`
messages. To reset that baseline instead, use `=semver: none`, `=semver:
patch`, `=semver: minor`, or `=semver: major`. This is useful, for example,

@HHobeck HHobeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay looks quite good. Good work. If you fix the last three open comments I will approve it.

Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs
Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs Outdated
Comment thread src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs Outdated
Copilot AI review requested due to automatic review settings August 15, 2026 14:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-08-15 15:19 UTC · Rule: default · triggered by @gittools-bot with the merge queue checkbox
  • Checks skipped · PR is already up-to-date
  • Merged2026-08-15 15:20 UTC · at c9b131e4505e17ca1e9b25fe64f6e0162c921932 · merge

This pull request spent 19 seconds in the queue, including 2 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub repository ruleset rule main branch rule]
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/DotNet Format
    • check-neutral = @github-actions/DotNet Format
    • check-skipped = @github-actions/DotNet Format
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Release
    • check-neutral = @github-actions/Release
    • check-skipped = @github-actions/Release
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Test (new-cli)
    • check-neutral = @github-actions/Build & Test (new-cli)
    • check-skipped = @github-actions/Build & Test (new-cli)
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Package / macos-26
    • check-neutral = @github-actions/Build & Package / macos-26
    • check-skipped = @github-actions/Build & Package / macos-26
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Package / ubuntu-24.04
    • check-neutral = @github-actions/Build & Package / ubuntu-24.04
    • check-skipped = @github-actions/Build & Package / ubuntu-24.04
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Package / windows-2025-vs2026
    • check-neutral = @github-actions/Build & Package / windows-2025-vs2026
    • check-skipped = @github-actions/Build & Package / windows-2025-vs2026
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @sonarqubecloud/SonarCloud Code Analysis
    • check-neutral = @sonarqubecloud/SonarCloud Code Analysis
    • check-skipped = @sonarqubecloud/SonarCloud Code Analysis
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / macos-26 - net10.0 - libgit2
    • check-neutral = @github-actions/Test / macos-26 - net10.0 - libgit2
    • check-skipped = @github-actions/Test / macos-26 - net10.0 - libgit2
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / macos-26 - net10.0 - managed
    • check-neutral = @github-actions/Test / macos-26 - net10.0 - managed
    • check-skipped = @github-actions/Test / macos-26 - net10.0 - managed
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
    • check-neutral = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
    • check-skipped = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
    • check-neutral = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
    • check-skipped = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
    • check-neutral = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
    • check-skipped = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
    • check-neutral = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
    • check-skipped = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed

@mergify mergify Bot added the queued label Aug 15, 2026
@mergify
mergify Bot merged commit e91c1f3 into GitTools:main Aug 15, 2026
64 checks passed
@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Thank you @fzlzjerry for your contribution!

@mergify mergify Bot removed the queued label Aug 15, 2026
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.

[FEATURE]: Support of '=semver: none|minor|major|patch' bump message to suppress the version increment

4 participants