Skip to content

Commit 87873f9

Browse files
jappjaLee-W
authored andcommitted
feat(cli): add --tag-format argument to changelog command
Changelog command already checks "tag_format" argument but cli support was missing.
1 parent e3b4465 commit 87873f9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

commitizen/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ def __call__(
450450
"help": "Export the changelog template into this file instead of rendering it",
451451
},
452452
*deepcopy(tpl_arguments),
453+
{
454+
"name": "--tag-format",
455+
"help": "The format of the tag, wrap around simple quotes",
456+
},
453457
],
454458
},
455459
{

tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME]
33
[--start-rev START_REV] [--merge-prerelease]
44
[--version-scheme {pep440,semver,semver2}]
55
[--export-template EXPORT_TEMPLATE] [--template TEMPLATE]
6-
[--extra EXTRA]
6+
[--extra EXTRA] [--tag-format TAG_FORMAT]
77
[rev_range]
88

99
generate changelog (note that it will overwrite existing file)
@@ -37,3 +37,5 @@ options:
3737
changelog template file name (relative to the current
3838
working directory)
3939
--extra, -e EXTRA a changelog extra variable (in the form 'key=value')
40+
--tag-format TAG_FORMAT
41+
The format of the tag, wrap around simple quotes

0 commit comments

Comments
 (0)