-
Notifications
You must be signed in to change notification settings - Fork 4
/
cliff.toml
67 lines (62 loc) · 2.36 KB
/
cliff.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
56
57
58
59
60
61
62
63
64
65
66
67
[changelog]
trim = true
header = ""
footer = ""
body = """
{% if version %}\
## v{{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%Y-%m-%d") }})
{% else %}\
## [unreleased]
{% endif %}\
{% raw %}\n{% endraw %}\
{%- for commit in commits | sort(attribute="group") %}
{%- if commit.scope -%}
{% else -%}
- **{{commit.group | striptags | trim | upper_first}}:** \
{% if commit.breaking %} [**⚠️ breaking ⚠️**] {% endif %}\
{{ commit.message | upper_first }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }}))
{% endif -%}
{% endfor -%}
{% for scope, commits in commits | filter(attribute="group") | group_by(attribute="scope") %}
### {{ scope | striptags | trim | upper_first }}
{% for commit in commits | sort(attribute="group") %}
- **{{commit.group | striptags | trim | upper_first}}:** \
{% if commit.breaking %} [**⚠️ breaking ⚠️**] {% endif %}\
{{ commit.message | upper_first }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }}))
{%- endfor -%}
{% raw %}\n{% endraw %}\
{% endfor %}
"""
postprocessors = [
{ pattern = '\$REPO', replace = "https://github.com/watchexec/clearscreen" },
]
[git]
conventional_commits = true
filter_unconventional = true
split_commits = true
protect_breaking_commits = true
filter_commits = true
tag_pattern = "v[0-9].*"
sort_commits = "oldest"
link_parsers = [
{ pattern = "#(\\d+)", href = "https://github.com/watchexec/clearscreen/issues/$1"},
{ pattern = "RFC(\\d+)", text = "ietf-rfc$1", href = "https://datatracker.ietf.org/doc/html/rfc$1"},
]
commit_parsers = [
{ message = "^feat", group = "Feature" },
{ message = "^fix", group = "Bugfix" },
{ message = "^tweak", group = "Tweak" },
{ message = "^doc", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor" },
{ message = "^(draft|wip)", group = "WIP" },
{ message = "^style", group = "Style" },
{ message = "^test", group = "Test" },
{ message = "^deps", group = "Deps" },
{ message = "^Initial [cC]ommit$", skip = true },
{ message = "^repo", group = "Repo" },
{ message = "^(release|merge|fmt|chore|ci)", skip = true },
{ body = ".*breaking", group = "Breaking" },
{ body = ".*security", group = "Security" },
{ message = "^revert", group = "Revert" },
]