-
-
Notifications
You must be signed in to change notification settings - Fork 281
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:
I'll test how it could works, for What do you think @Lee-W ? |
Enable creation of annotated tags when bumping.
ad554a4
to
d2b0ebe
Compare
@@ -216,6 +214,15 @@ Some examples | |||
bump_message = "release $current_version → $new_version [skip-ci]" | |||
``` | |||
|
|||
### `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.
for consistency, I'll suggest using --annotated_tag
### `annotated_tag` | ||
|
||
Whether to create annotated tags or lightweight ones. | ||
|
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.
@@ -131,6 +131,11 @@ | |||
), | |||
"action": "store_true", | |||
}, | |||
{ | |||
"name": ["--annotated-tag", "-at"], | |||
"help": "create annotated tag instead of lightweight one", |
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)
c = git.tag(new_tag_version) | ||
c = git.tag( | ||
new_tag_version, | ||
annotated=self.bump_settings.get("annotated_tag", False) |
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
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
I have the same concerns as you, not sure how used is in practice, spite of what the documentation says. |
Got it. It makes more sense after reading it. I'm now neutral to make it as a default. |
Please remove the changes on |
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 ???