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

Allow customizing commit message pattern in prepare-release command #996

Merged
merged 4 commits into from
Nov 15, 2023

Conversation

fmacavilca
Copy link
Contributor

@fmacavilca fmacavilca commented Nov 9, 2023

By default, the prepare-release command generates a commit message with the format "Set version to {version}". So with this new option, You can add a prefix or suffix to the default commit message (which will replace just the version).

For example, running the following command on master

nbgv prepare-release --commit-message-pattern "Custom commit message pattern - {0} custom message"

So your commit message is going to be this:

Custom commit message pattern '1.0' custom message

Note: Must include {0} in the pattern to represent the version.

closes #991

@fmacavilca
Copy link
Contributor Author

@dotnet-policy-service agree

@AArnott AArnott changed the title Enhancement991 Allow customizing commit message pattern in prepare-release command Nov 10, 2023
Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

I like it. Just a few changes please. The design change idea (about reducing what {0} is replaced with) is just an idea. It's at your discretion.

doc/nbgv-cli.md Show resolved Hide resolved
src/nbgv/Program.cs Outdated Show resolved Hide resolved
src/nbgv/Program.cs Outdated Show resolved Hide resolved
…message pattern to customize all the message
Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Thanks for this!

src/nbgv/Program.cs Outdated Show resolved Hide resolved
@AArnott AArnott merged commit 0e809cf into dotnet:main Nov 15, 2023
14 checks passed
@fmacavilca
Copy link
Contributor Author

@AArnott, do you know when it will be published in the new release?

@AArnott
Copy link
Collaborator

AArnott commented Nov 16, 2023

I can issue a prerelease to nuget.org if that will suffice for you.

@fmacavilca
Copy link
Contributor Author

Yes, please. It will be great. Thanks

@AArnott
Copy link
Collaborator

AArnott commented Nov 16, 2023

https://www.nuget.org/packages/Nerdbank.GitVersioning/3.7.48-alpha

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.

New feature - Command "prepare-release" with a paremeter for add a prefix to the commit's
5 participants