From eb45ef5d2f055dda96c0242a1f3b1baff4abbb96 Mon Sep 17 00:00:00 2001 From: Jani Jappinen <2580412+jappja@users.noreply.github.com> Date: Thu, 15 May 2025 09:19:20 +0000 Subject: [PATCH] feat(cli): add --tag-format argument to changelog command Changelog command already checks "tag_format" argument but cli support was missing. --- commitizen/cli.py | 4 ++++ ...angelog_command_shows_description_when_use_help_option.txt | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/commitizen/cli.py b/commitizen/cli.py index 72d824380d..d08afc6706 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -450,6 +450,10 @@ def __call__( "help": "Export the changelog template into this file instead of rendering it", }, *deepcopy(tpl_arguments), + { + "name": "--tag-format", + "help": "The format of the tag, wrap around simple quotes", + }, ], }, { diff --git a/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt b/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt index 461eb2edd6..91b7f389b5 100644 --- a/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt @@ -3,7 +3,7 @@ usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME] [--start-rev START_REV] [--merge-prerelease] [--version-scheme {pep440,semver,semver2}] [--export-template EXPORT_TEMPLATE] [--template TEMPLATE] - [--extra EXTRA] + [--extra EXTRA] [--tag-format TAG_FORMAT] [rev_range] generate changelog (note that it will overwrite existing file) @@ -37,3 +37,5 @@ options: changelog template file name (relative to the current working directory) --extra, -e EXTRA a changelog extra variable (in the form 'key=value') + --tag-format TAG_FORMAT + The format of the tag, wrap around simple quotes