-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cz.toml
55 lines (46 loc) · 2.96 KB
/
.cz.toml
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
[tool.commitizen]
version = "0.0.6"
template = ".github/templates/CHANGELOG.md.j2"
name = "cz_customize"
[tool.commitizen.customize]
message_template = "{{change_type}}{% if scope %}({{scope}}){% endif %}: {{subject}}{% if ticket_no %} ({{ticket_no}}){% endif %}{% if body %}\n\n{{body}}{% endif %}"
bump_pattern = "^((BREAKING[\\-\\ ]CHANGE|\\w+)(\\(.+\\))?!?):"
bump_map = { "^.+!$" = "MAJOR", "^BREAKING[\\- ]CHANGE" = "MAJOR", "^feat" = "MINOR", "^fix" = "PATCH", ci = "PATCH", build = "PATCH", "^refactor" = "PATCH", "^perf" = "PATCH" }
schema = "<type>: <body>"
schema_pattern = "^(build|ci|docs|feat|fix|perf|refactor|style|test|revert)(\\(\\w+\\))?: [\\w -.]+(\\((#)-[0-9]+\\))?(\\[skip ci\\](.|\\n)*)?$"
commit_parser = "^(?P<change_type>build|ci|docs|feat|fix|perf|refactor|style|test|revert|BREAKING CHANGE)(?:\\((?P<scope>[^)]+)\\))?:?\\s(?P<message>.*)?"
changelog_pattern = "^(build|ci|docs|feat|fix|perf|refactor|style|test|revert)?(!)?"
change_type_order = ["BREAKING CHANGE", "feat", "fix", "refactor", "perf", "style", "test", "build", "ci"]
change_type_map = {"build" = "Build process", "ci" = "Continuous integration/delivery", "feat" = "New Features", "fix" = "Bug fixes", "style" = "Code style changes", "refactor" = "Refactored", "test" = "Tests" }
[[tool.commitizen.customize.questions]]
type = "list"
name = "change_type"
choices = [
{value = "fix", name = "fix: A bug fix. Correlates with PATCH in SemVer"},
{value = "feat", name = "feat: A new feature. Correlates with MINOR in SemVer"},
{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)"},
{value = "refactor", name = "refactor: A code change that neither fixes a bug nor adds a feature"},
{value = "perf", name = "perf: A code change that improves performance"},
{value = "test", name = "test: Adding missing or correcting existing tests"},
{value = "build", name = "build: Changes that affect the build system or external dependencies (example scopes: pip, docker, npm)"},
{value = "ci", name = "ci: Changes to our CI configuration files and scripts (example scopes: Jenkins, Docker)"},
{value = "BREAKING CHANGE", name = "BREAKING: A major change."}
]
message = "Select the type of change you are committing"
[[tool.commitizen.customize.questions]]
type = "input"
name = "scope"
message = "What is the scope of this change? (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 = "input"
name = "ticket_no"
message = "Ticket number i.e: #7 (Keep empty if no ticket)\n"