Skip to content

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

…ve as default value "{0}" before the default was null and had error on some unit test
@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.

…message pattern to customize all the message
@fmacavilca fmacavilca requested a review from AArnott November 14, 2023 14:23
@AArnott AArnott enabled auto-merge November 15, 2023 04:10
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!

@AArnott AArnott merged commit 0e809cf into dotnet:main Nov 15, 2023
@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