Repository navigation
Expand file tree
/
Copy pathcliff.toml
More file actions
54 lines (51 loc) · 2.31 KB
/
Copy pathcliff.toml
File metadata and controls
54 lines (51 loc) · 2.31 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
[changelog]
header = ""
body = """
{% if version %}## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}## [Unreleased]
{% endif %}
{#- A `!` or `BREAKING CHANGE:` commit is otherwise indistinguishable from any
other feat/refactor in the grouped sections below, so the one release that
needs an upgrade note ships without one. Emit those commits again, first.
Each bullet is the footer's *first paragraph only*, collapsed onto one
line: `split("\n\n") | first` drops trailing issue trailers (e.g.
`CIP-1234`) and any elaboration after the opening paragraph, then
`replace` folds the remaining hard wraps into spaces. So write the upgrade
instruction as the footer's opening paragraph — anything below it will not
reach the changelog.
For a `!` commit with no `BREAKING CHANGE:` footer, git-cliff sets
`breaking_description` to the commit subject, so the bullet repeats the
subject line. Breaking commits also still appear in their own group. -#}
{%- set breaking = commits | filter(attribute="breaking", value=true) -%}
{% if breaking | length > 0 %}
### ⚠ Breaking changes
{% for commit in breaking %}
- {{ commit.breaking_description | split(pat="\n\n") | first | trim | replace(from="\n", to=" ") }}\
{% endfor %}
{% endif %}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | split(pat="\n") | first | trim }}\
{% endfor %}
{% endfor %}
"""
trim = true
[git]
conventional_commits = true
filter_unconventional = false
# `review(...)` commits are PR-feedback housekeeping (addressing reviewer
# comments). They don't represent user-facing changes — the underlying
# feat/fix/refactor commits already capture those — so skip them rather than
# letting the raw `review` type become a stray "### Review" changelog section.
commit_parsers = [
{ message = "^review", skip = true },
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Fixes" },
{ message = "^docs", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactoring" },
{ message = "^test", group = "Testing" },
{ message = "^chore", group = "Miscellaneous" },
{ message = "^ci", group = "CI" },
]