Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The increment of the branch will be ignored when prevent-increment is set to true on the branch #3924

Conversation

HHobeck
Copy link
Contributor

@HHobeck HHobeck commented Feb 23, 2024

Detailed Description

Introduce a new branch related property of name prevent-increment-when-branch-merged. This property can be used like the prevent-increment-of-merged-branch property to control the behavior of how to increment the version when a branch has been merged.

The configuration could be look like as following:

prevent-increment:
  of-merged-branch: false
  when-branch-merged: false # new branch related property
  when-current-commit-tagged: true

Context

Following business statements applying:

  • The increment of the branch merged to will be ignored, regardless of whether the merged branch has a version number or not, when prevent-increment-of-merged-branch is set to true on the target branch
  • The increment of the merged branch will be ignored when prevent-increment-when-branch-merged is set to true on the source branch

Close #3922

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.

@HHobeck HHobeck changed the title The increment of the target branch will be ignored when prevent-increment is set to true on the source branch The increment of the branch will be ignored when prevent-increment is set to true on the branch Feb 23, 2024
@arturcic arturcic merged commit 2f72ea3 into GitTools:main Feb 23, 2024
138 checks passed
@arturcic arturcic modified the milestone: 6.x Feb 23, 2024
Copy link
Contributor

mergify bot commented Feb 23, 2024

Thank you @HHobeck for your contribution!

arturcic added a commit to arturcic/GitVersion that referenced this pull request Feb 25, 2024
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] The increment of the branch will be ignored when prevent-increment is set to true on the branch
2 participants