-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.cz.toml
More file actions
97 lines (87 loc) · 3.88 KB
/
.cz.toml
File metadata and controls
97 lines (87 loc) · 3.88 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[tool.commitizen]
version_files = ["VERSION"]
version = "6.1.2"
tag_format = "v$version"
name = "cz_customize"
[tool.commitizen.customize]
message_template = "{{prefix}}{% if scope %}({{scope}}){% endif %}: {{subject}}{% if body %}\n\n{{body}}{% endif %}{% if is_breaking_change %}\n\nBREAKING CHANGE: {{footer}}{% else %}\n\n{{footer}}{% endif %}"
bump_pattern = "^(BREAKING[\\-\\ ]CHANGE|feat|fix|refactor|perf|ci|docs|style|test|chore|revert|build)(\\(.+\\))?(!)?"
change_type_order = [
"BREAKING CHANGE",
"Feat",
"Fix",
"Refactor",
"Perf",
"CI",
"Docs",
"Technical",
"Tests",
]
bump_message = "bump: version $current_version → $new_version"
schema = "<type>(<scope>): <subject>\n<BLANK LINE>\n<body>\n<BLANK LINE>\n(BREAKING CHANGE: )<footer>"
schema_pattern = "(?s)(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\\(\\S+\\))?!?:( [^\\n\\r]+)((\\n\\n.*)|(\\s*))?$"
commit_parser = "^(?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE|ci|docs|style|test|chore|revert|build)(?:\\((?P<scope>[^()\\r\\n]*)\\)|\\()?(?P<breaking>!)?:\\s(?P<message>.*)?"
version_parser = "(?P<version>([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+)?(\\w+)?)"
changelog_pattern = "^(BREAKING[\\-\\ ]CHANGE|feat|fix|refactor|perf|ci|docs|style|test|chore|revert|build)(\\(.+\\))?(!)?" # same as bump_pattern
[tool.commitizen.customize.bump_map]
"^.+!$" = "MAJOR"
"^BREAKING[\\-\\ ]CHANGE" = "MAJOR"
"^feat" = "MINOR"
"^fix" = "PATCH"
"^refactor" = "PATCH"
"^perf" = "PATCH"
"^ci" = "PATCH"
"^docs" = "PATCH"
"^style" = "PATCH"
"^test" = "PATCH"
"^chore" = "PATCH"
"^revert" = "PATCH"
"^build" = "PATCH"
[tool.commitizen.customize.change_type_map]
"feat" = "Feat"
"fix" = "Fix"
"refactor" = "Refactor"
"perf" = "Perf"
"ci" = "CI"
"docs" = "Docs"
"style" = "Technical"
"test" = "Tests"
"chore" = "Technical"
"revert" = "Fix"
"build" = "Technical"
[[tool.commitizen.customize.questions]]
type = "list"
name = "prefix"
message = "Select the type of change you are committing"
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 = "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" },
]
[[tool.commitizen.customize.questions]]
type = "input"
name = "scope"
message = "What is the scope of this change? ((story number, class or file name): (press [enter] to skip)\n"
[[tool.commitizen.customize.questions]]
type = "input"
name = "subject"
message = "Write a short and imperative summary of the code changes: (lower case and no period)\n"
[[tool.commitizen.customize.questions]]
type = "input"
name = "body"
message = "Provide additional contextual information about the code changes: (press [enter] to skip)\n"
[[tool.commitizen.customize.questions]]
type = "confirm"
message = "Is this a BREAKING CHANGE? Correlates with MAJOR in SemVer"
name = "is_breaking_change"
default = false
[[tool.commitizen.customize.questions]]
type = "input"
name = "footer"
message = "Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)\n"