diff --git a/commitizen/cz/conventional_commits/conventional_commits.py b/commitizen/cz/conventional_commits/conventional_commits.py index 6ac62d5ec..d51e8bdf2 100644 --- a/commitizen/cz/conventional_commits/conventional_commits.py +++ b/commitizen/cz/conventional_commits/conventional_commits.py @@ -45,16 +45,23 @@ def questions(self) -> List[Dict[str, Any]]: "type": "list", "name": "prefix", "message": "Select the type of change you are committing", + "use_shortcuts": self.config.settings['use_shortcuts'], "choices": [ { "value": "fix", "name": "fix: A bug fix. Correlates with PATCH in SemVer", + "key": "x", }, { "value": "feat", "name": "feat: A new feature. Correlates with MINOR in SemVer", + "key": "f", + }, + { + "value": "docs", + "name": "docs: Documentation only changes", + "key": "d", }, - {"value": "docs", "name": "docs: Documentation only changes"}, { "value": "style", "name": ( @@ -62,6 +69,7 @@ def questions(self) -> List[Dict[str, Any]]: "meaning of the code (white-space, formatting," " missing semi-colons, etc)" ), + "key": "s", }, { "value": "refactor", @@ -69,16 +77,19 @@ def questions(self) -> List[Dict[str, Any]]: "refactor: A code change that neither fixes " "a bug nor adds a feature" ), + "key": "r", }, { "value": "perf", "name": "perf: A code change that improves performance", + "key": "p", }, { "value": "test", "name": ( "test: Adding missing or correcting " "existing tests" ), + "key": "t", }, { "value": "build", @@ -86,6 +97,7 @@ def questions(self) -> List[Dict[str, Any]]: "build: Changes that affect the build system or " "external dependencies (example scopes: pip, docker, npm)" ), + "key": "b", }, { "value": "ci", @@ -93,7 +105,8 @@ def questions(self) -> List[Dict[str, Any]]: "ci: Changes to our CI configuration files and " "scripts (example scopes: GitLabCI)" ), - }, + "key": "c", + } ], }, { diff --git a/commitizen/defaults.py b/commitizen/defaults.py index 83f2ca463..5d21f67a9 100644 --- a/commitizen/defaults.py +++ b/commitizen/defaults.py @@ -21,6 +21,7 @@ "changelog_incremental": False, "changelog_start_rev": None, "update_changelog_on_bump": False, + "use_shortcuts": False, } MAJOR = "MAJOR"