summaryrefslogtreecommitdiffstats
path: root/.cz.toml
blob: 09dbad06da767a16ea6ac373f19292a11e5f8c2b (plain)
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."