mirror of
https://github.com/mfocko/blog.git
synced 2024-11-24 05:51:55 +01:00
ci(cz): add commitizen
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
1fa1f6faa7
commit
18f722bff5
2 changed files with 57 additions and 0 deletions
50
.cz.toml
Normal file
50
.cz.toml
Normal file
|
@ -0,0 +1,50 @@
|
|||
[tool]
|
||||
[tool.commitizen]
|
||||
name = "cz_customize"
|
||||
tag_format = "$version"
|
||||
version_scheme = "semver"
|
||||
version = "0.0.1"
|
||||
update_changelog_on_bump = true
|
||||
major_version_zero = true
|
||||
|
||||
[tool.commitizen.customize]
|
||||
message_template = """\
|
||||
{{change_type}}{% if scope %}({{scope}}){% endif %}: {{subject}}\
|
||||
|
||||
{% if body %}\n\n{{body}}{% endif %}
|
||||
"""
|
||||
example = "seminar(01): add changes from seminar"
|
||||
schema = "‹type›‹optional scope›: ‹message›\n\n‹body›"
|
||||
schema_pattern = """\
|
||||
(?s)\
|
||||
(chore|feat|fix|ci|style|algorithms|automata|blog|c|cpp|foundations|functional)\
|
||||
(\\(\\S+\\))?!?:\
|
||||
( [^\\n\\r]+)\
|
||||
((\\n\\n.*)|(\\s*))?$\
|
||||
"""
|
||||
|
||||
[[tool.commitizen.customize.questions]]
|
||||
type = "list"
|
||||
name = "change_type"
|
||||
choices = [
|
||||
"chore", "feat", "fix", "ci", "style",
|
||||
"blog",
|
||||
"algorithms", "automata", "functional",
|
||||
"c", "cpp", "foundations",
|
||||
]
|
||||
message = "Select the type of change you are commiting"
|
||||
|
||||
[[tool.commitizen.customize.questions]]
|
||||
type = "input"
|
||||
name = "scope"
|
||||
message = "What is the scope of this change? (e.g., KB area, blog or area of change): (press [enter] to skip)"
|
||||
|
||||
[[tool.commitizen.customize.questions]]
|
||||
type = "input"
|
||||
name = "subject"
|
||||
message = "Write a short and imperative summary of the code changes: (lower case and no period)"
|
||||
|
||||
[[tool.commitizen.customize.questions]]
|
||||
type = "input"
|
||||
name = "body"
|
||||
message = "Provide additional contextual information about the code changes: (press [enter] to skip)"
|
|
@ -15,3 +15,10 @@ repos:
|
|||
rev: v3.1.0
|
||||
hooks:
|
||||
- id: prettier
|
||||
- repo: https://github.com/commitizen-tools/commitizen
|
||||
rev: v3.15.0
|
||||
hooks:
|
||||
- id: commitizen
|
||||
- id: commitizen-branch
|
||||
stages:
|
||||
- push
|
||||
|
|
Loading…
Reference in a new issue