1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# ref: https://github.com/commitizen-tools/commitizen/blob/master/docs/customization.md
[tool.commitizen]
name = "cz_customize"
[tool.commitizen.customize]
message_template = "{{change_type}}: {{message}}"
example = "๐ docs: create README.md"
schema = "<type>: <body>"
# schema_pattern = "(feature|bug fix):(\\s.*)"
# schema_pattern = "^(?P<change_type>):\\s(?P<message>.*)?"
bump_pattern = "^(break|new|fix|hotfix)"
bump_map = {"break" = "MAJOR", "new" = "MINOR", "fix" = "PATCH", "hotfix" = "PATCH"}
change_type_order = ["BREAKING CHANGE", "Feat", "Fix", "Refactor", "Perf"]
# commit_parser = "^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?"
# changelog_pattern = "^(โจ feat|๐ง fix)?(!)?"
# change_type_map = {"โจ feat" = "Feat", "๐ง fix" = "Fix"}
[[tool.commitizen.customize.questions]]
type = "list"
name = "change_type"
choices = [
{value = "โจ feat", name = "โจ feat: Work on feature-related tasks."},
{value = "๐ง fix", name = "๐ง fix: Fix a bug."},
{value = "๐ docs", name = "๐ docs: Add or update documentation."},
{value = "โป๏ธ refact", name = "โป๏ธ refact: Refactor code."},
{value = "๐จ style", name = "๐จ style: Improve structure / format of the code or apply linter."},
{value = "โ
test", name = "โ
test: Add, update, or pass tests."},
{value = "๐งน chore", name = "๐งน chore: Do other grunt works."},
{value = "โ๏ธ setting", name = "โ๏ธ setting: Add or update setting related tasks such as modifying dependencies, writing util scripts, etc."},
{value = "๐ท๏ธ bump", name = "๐ท๏ธ bump: Add a release / version tag."},
{value = "๐ init", name = "๐ init: Create a new project."},
]
message = "Select the type of change you are committing"
[[tool.commitizen.customize.questions]]
type = "input"
name = "message"
message = "Write a commit message:"
[[tool.commitizen.customize.questions]]
# type = "confirm"
# message = "Do you want to confirm this commit?"
type = "press_any_key_to_continue"
name = "confirm_commit"
message = "Press any key to confirm this commit, or ctrl+c key to cancel this commit."
|