Repository navigation
Expand file tree
/
Copy pathcliff.toml
More file actions
56 lines (50 loc) · 1.86 KB
/
Copy pathcliff.toml
File metadata and controls
56 lines (50 loc) · 1.86 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
# git-cliff configuration for GitHub Release notes.
# https://git-cliff.org/docs/configuration
[changelog]
body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% if commits | length == 0 -%}
No notable changes.
{% else -%}
{% set ordered_groups = ["New Features", "Bug Fixes", "Security", "Performance", "Documentation", "Tests", "Maintenance", "Other Changes"] %}
{% set grouped_commits = commits | group_by(attribute="group") %}
{% for group in ordered_groups -%}
{% if group in grouped_commits -%}
## {{ group }}
{% for commit in grouped_commits[group] -%}
{% if commit.remote.pr_title -%}
{%- set commit_message = commit.remote.pr_title -%}
{%- else -%}
{%- set commit_message = commit.message -%}
{%- endif -%}
- {{ commit_message | split(pat="\n") | first | trim }}{% if commit.remote.pr_number %} ([#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }})){% endif %}
{% endfor %}
{% endif -%}
{% endfor %}
{% endif -%}
"""
trim = true
postprocessors = [
{ pattern = "(?m)^- (feat|fix|docs?|security|perf|refactor|test|ci|build|chore)(\\([^)]+\\))?!?:\\s*", replace = "- " },
]
[git]
conventional_commits = true
filter_unconventional = false
filter_commits = false
tag_pattern = "v[0-9].*"
sort_commits = "oldest"
commit_parsers = [
{ message = "^Merge pull request", skip = true },
{ message = "^Merge branch", skip = true },
{ message = "^feat", group = "New Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^security", group = "Security" },
{ message = "^perf", group = "Performance" },
{ message = "^docs?", group = "Documentation" },
{ message = "^test", group = "Tests" },
{ message = "^refactor", group = "Maintenance" },
{ message = "^(ci|build|chore)", group = "Maintenance" },
{ message = ".*", group = "Other Changes" },
]