Skip to content

Commit 9d0fb0b

Browse files
LuisHenriLee-W
authored andcommitted
feat: add tag message argument to cli
1 parent 4df9a7f commit 9d0fb0b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

commitizen/cli.py

+5
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ def __call__(
243243
"help": "create annotated tag instead of lightweight one",
244244
"action": "store_true",
245245
},
246+
{
247+
"name": ["--annotated-tag-message", "-atm"],
248+
"help": "create annotated tag message",
249+
"type": str,
250+
},
246251
{
247252
"name": ["--gpg-sign", "-s"],
248253
"help": "sign tag instead of lightweight one",

commitizen/commands/bump.py

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def __init__(self, config: BaseConfig, arguments: dict):
5050
"bump_message",
5151
"gpg_sign",
5252
"annotated_tag",
53+
"annotated_tag_message",
5354
"major_version_zero",
5455
"prerelease_offset",
5556
"template",
@@ -366,6 +367,8 @@ def __call__(self): # noqa: C901
366367
or bool(self.config.settings.get("gpg_sign", False)),
367368
annotated=self.bump_settings.get("annotated_tag", False)
368369
or bool(self.config.settings.get("annotated_tag", False)),
370+
msg=self.bump_settings.get("annotated_tag_message", None),
371+
# TODO: also get from self.config.settings?
369372
)
370373
if c.return_code != 0:
371374
raise BumpTagFailedError(c.err)

0 commit comments

Comments
 (0)