-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathcliff.toml
More file actions
61 lines (59 loc) · 1.92 KB
/
cliff.toml
File metadata and controls
61 lines (59 loc) · 1.92 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
[git]
conventional_commits = true
filter_commits = true
tag_pattern = "^v\\d+\\.\\d+\\.\\d+"
merge_commit = false
skip_commit = [
"^Release",
"^Merge pull request",
"^0\\.\\d+\\.\\d+",
]
commit_parsers = [
{ message = "^feat", group = "Features" },
# Skip CI-scoped commits regardless of type (fix(ci), chore(ci), etc.)
{ message = "^\\w+\\(ci\\)", skip = true },
{ message = "^\\w+\\(publish\\)", skip = true },
{ message = "^\\w+\\(release\\)", skip = true },
{ message = "^\\w+\\(build\\)", skip = true },
{ message = "^fix", group = "Fixes" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactors" },
{ message = "^build", skip = true },
{ message = "^ci", skip = true },
{ message = "^docs?", group = "Docs" },
{ message = "^test", group = "Tests" },
{ message = "^revert", group = "Reverts" },
{ message = "^chore", skip = true },
{ message = "^style", skip = true },
{ message = ".*", group = "Other", default = true },
]
[changelog]
header = ""
footer = ""
trim = true
body = """
{% if version -%}
## {{ version }} — {{ timestamp | date(format="%Y-%m-%d") }}
{%- else -%}
## Unreleased
{%- endif %}
{%- for group, group_commits in commits | group_by(attribute="group") -%}
{%- if group_commits | length > 0 %}
### {{ group }}
{%- for commit in group_commits -%}
{%- if commit.parsed %}
{%- set scope = commit.parsed.scope | default(value="") -%}
{%- set description = commit.parsed.description | trim -%}
{%- else %}
{%- set scope = "" -%}
{%- set description = commit.message | trim -%}
{%- endif %}
{%- if scope != "" -%}
{%- set scope = scope | replace(from="_", to=" ") | title -%}
{%- endif %}
- {{ description | replace(from="\n", to=" ") | trim }}{% if scope != "" %} ({{ scope }}){% endif %}{% if commit.breaking %} **BREAKING**{% endif %}{% if commit.pull_request %} (#{{ commit.pull_request }}){% endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
{{ "\n" }}
"""