2020-06-08 04:38:47 +00:00
|
|
|
# use with https://commitizen-tools.github.io/commitizen/
|
|
|
|
|
|
|
|
[tool.commitizen]
|
|
|
|
name = "cz_customize"
|
|
|
|
version = "0.0.1"
|
|
|
|
tag_format = "$version"
|
|
|
|
|
|
|
|
|
|
|
|
[tool.commitizen.customize]
|
|
|
|
message_template = """{{change_type}}: {{change_message}}{% if changed_components %}
|
|
|
|
|
|
|
|
components: {{changed_components}}{% endif %}{% if change_reason %}
|
|
|
|
|
|
|
|
{{change_reason}}{% endif %}{% if solved_ticket %}
|
|
|
|
|
|
|
|
fixes {{solved_ticket}}]{% endif %}"""
|
2020-06-09 16:58:38 +00:00
|
|
|
example = """imp: sync feature
|
|
|
|
|
|
|
|
components: module
|
|
|
|
|
|
|
|
Previously, sync was done synchronously, now we sync every
|
|
|
|
syncInterval (default: 60s) and store the records in memory.
|
|
|
|
|
|
|
|
This way we can reduce the chatter with the backend service without significant
|
|
|
|
downside on actuality of entries. Since syncInterval is configurable,
|
|
|
|
operators still can fine tune to their needs.
|
2020-06-08 04:38:47 +00:00
|
|
|
|
2020-06-09 16:58:38 +00:00
|
|
|
fixes #123
|
|
|
|
"""
|
|
|
|
schema = """
|
|
|
|
<type>: <title>
|
|
|
|
[
|
|
|
|
components: <components>]
|
|
|
|
[
|
|
|
|
<reason>]
|
|
|
|
[
|
|
|
|
fixes <ticket>]
|
2020-06-08 04:38:47 +00:00
|
|
|
"""
|
|
|
|
bump_pattern = "^(break|imp|add|fix)"
|
|
|
|
bump_map = {"break" = "MAJOR", "add" = "MINOR", "imp" = "MINOR", "fix" = "PATCH"}
|
|
|
|
info = """
|
2020-06-09 16:58:38 +00:00
|
|
|
Well-formed commit messages are used to craft CHANGELOG.md and to determine
|
|
|
|
version bumps. Please procure for a parseable history on master branch.
|
2020-06-08 04:38:47 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
[[tool.commitizen.customize.questions]]
|
|
|
|
type = "list"
|
|
|
|
name = "change_type"
|
2020-06-09 16:58:38 +00:00
|
|
|
choices = [
|
|
|
|
{value = "break", name = "break - principal: affect the configuration api in backwards incompatible way"},
|
|
|
|
{value = "imp", name = "imp - principal: improve an existing feature"},
|
|
|
|
{value = "add", name = "add - principal: add a new feature"},
|
|
|
|
{value = "fix", name = "fix - principal: fix something, usually closing an issueo"},
|
|
|
|
{value = "ref", name = "ref - principal: refactor code strictly without altering it's behaviour"},
|
|
|
|
{value = "fixup", name = "fixup - auxiliary: fixup a previous commit, used for oversights, typos, etc."},
|
|
|
|
{value = "wip", name = "wip - auxiliary: commit work in progress (do it frequently)"},
|
|
|
|
{value = "revert", name = "revert - maintenance: revert a previous committ"},
|
|
|
|
{value = "chore", name = "chore - maintenance: commit on repository tooling"},
|
|
|
|
{value = "lint", name = "lint - maintenance: commit on linting"},
|
|
|
|
]
|
2020-06-08 04:38:47 +00:00
|
|
|
message = "Select type of change:"
|
|
|
|
|
|
|
|
[[tool.commitizen.customize.questions]]
|
|
|
|
type = "input"
|
|
|
|
name = "change_message"
|
|
|
|
message = "Short title:"
|
|
|
|
|
|
|
|
[[tool.commitizen.customize.questions]]
|
|
|
|
type = "list"
|
|
|
|
name = "changed_components"
|
|
|
|
choices = [
|
|
|
|
"",
|
|
|
|
"module",
|
|
|
|
"tests",
|
|
|
|
]
|
|
|
|
message = "Select components - optional:"
|
|
|
|
|
|
|
|
[[tool.commitizen.customize.questions]]
|
|
|
|
type = "input"
|
|
|
|
name = "change_reason"
|
|
|
|
message = "Detail change reason - optional:"
|
|
|
|
|
|
|
|
[[tool.commitizen.customize.questions]]
|
|
|
|
type = "input"
|
|
|
|
name = "solved_ticket"
|
|
|
|
message = "Issue(s) solved - optional; format '#123':"
|
|
|
|
|