Skip to content

Commit

Permalink
feat(prompt): add keyboard shortcuts with config option
Browse files Browse the repository at this point in the history
  • Loading branch information
zevisert authored and Lee-W committed Aug 13, 2021
1 parent 07ac1ea commit cfec0f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 15 additions & 2 deletions commitizen/cz/conventional_commits/conventional_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,55 +45,68 @@ 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": (
"style: Changes that do not affect the "
"meaning of the code (white-space, formatting,"
" missing semi-colons, etc)"
),
"key": "s",
},
{
"value": "refactor",
"name": (
"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",
"name": (
"build: Changes that affect the build system or "
"external dependencies (example scopes: pip, docker, npm)"
),
"key": "b",
},
{
"value": "ci",
"name": (
"ci: Changes to our CI configuration files and "
"scripts (example scopes: GitLabCI)"
),
},
"key": "c",
}
],
},
{
Expand Down
1 change: 1 addition & 0 deletions commitizen/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"changelog_incremental": False,
"changelog_start_rev": None,
"update_changelog_on_bump": False,
"use_shortcuts": False,
}

MAJOR = "MAJOR"
Expand Down

0 comments on commit cfec0f5

Please sign in to comment.