-
-
Notifications
You must be signed in to change notification settings - Fork 301
fix(#271): add annotated_tag option to bump #272
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
fix(#271): add annotated_tag option to bump #272
Conversation
Codecov Report
@@ Coverage Diff @@ ## master #272 +/- ## ========================================== + Coverage 96.61% 96.62% +0.01% ========================================== Files 33 33 Lines 915 919 +4 ========================================== + Hits 884 888 +4 Misses 31 31
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Even if this were unrelated to the original issue (not triggering a workflow). I think it would be useful for traceability. An annotated tag adds:
- date
- creator
- message -> it could even contain the changes from the release which would appear in the changelog
I'll test how it could works, for v3
could be the default.
What do you think @Lee-W ?
Enable creation of annotated tags when bumping.
ad554a4
to
d2b0ebe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency, I'll suggest using --annotated_tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my understand is correct, we can use cz bump -at
and set it in config to achive it. If so, I'd suggest adding both usages here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can change the help message to create an annotated tag (by default, commitizen creates lightweight tag)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to enhance readbility, I would suggest make self.bump_settings.get("annotated_tag", False) or or bool(self.config.settings.get("annotated_tag", False))
a variable. I read this line for a few times to understand
Even if this were unrelated to the original issue (not triggering a workflow). I think it would be useful for traceability. An annotated tag adds:
* date * creator * message -> it could even contain the changes from the release which would appear in the changelog
I'll test how it could works, for
v3
could be the default.What do you think @Lee-W ?
Although I love this feature, I'm a bit against making it a default option. I'm not sure how common annotated tag is used in practice.
Doing man git-tag
gives this:
Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels.
I have the same concerns as you, not sure how used is in practice, spite of what the documentation says.
But let's see, maybe once we start using it, it does make more sense.
Got it. It makes more sense after reading it. I'm now neutral to make it as a default.
Please remove the changes on CHANGELOG.md
and rebase. Looks good.
This was already added
Description
Create annotated tags, when bumping.
Checklist
./script/format
and./script/test
locally to ensure this change passes linter check and testExpected behavior
With
annotated_tag
enabled commitizen will create annotated tag instead of lightweight ones.Steps to Test This Pull Request
Use
cz bump --annotated_tag
orannotated_tag = 1
in config fileAdditional context
maybe related to #261 ???