-
Notifications
You must be signed in to change notification settings - Fork 61
/
cliff.toml
96 lines (78 loc) · 2.85 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
#
# To bump the changelog:
#
# ```console
# $ TAG="x.y.z"
# $ TAG=v"$TAG"
# $ git-cliff --github-token (gh auth token) --prepend CHANGELOG.md --tag "$TAG" --unreleased
# ```
[changelog]
header = """
# Changelog\n
"""
body = """
{% if version -%}
## [{{ version | trim_start_matches(pat="v") }}](https://github.com/catppuccin/nix/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else -%}
## [Unreleased]
{% endif -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | filter(attribute="scope") | sort(attribute="scope") -%}
- **{{ commit.scope }}**: {{ commit.message | trim }}\
{%- if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}
{% endfor -%}
{% for commit in commits -%}
{% if commit.scope -%}
{% else -%}
- {{ commit.message | trim }}\
{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
### New Contributors
{% endif -%}
{% for contributor in github.contributors | filter(attribute="username") | filter(attribute="is_first_time", value=true) | sort(attribute="username") -%}
* @{{ contributor.username }} made their first contribution\
{% if contributor.pr_number %} in #{{ contributor.pr_number }}{% endif %}
{% endfor %}\n
"""
footer = """
<!-- generated by git-cliff -->
"""
trim = true
postprocessors = [
# Issues/PR
{ pattern = "#([0-9]+)", replace = "[#${1}](https://github.com/catppuccin/nix/issues/${1})" },
# Commits
{ pattern = "([a-f0-9]{7})", replace = "[${1}](https://github.com/catppuccin/nix/commit/${1})" },
# GitHub Users
{ pattern = " @([a-zA-Z0-9-_]+)", replace = " [@${1}](https://github.com/${1})" }
]
[git]
commit_preprocessors = [
# Remove issue numbers
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
]
commit_parsers = [
# This commit message isn't properly escaped
{ sha = "aa3a9816e9d6bc361ab1156f1e7a850fc0b5f4f8", skip = true },
# Ignore bot PRs
{ field = "author.name", pattern = "\\[bot\\]", skip = true },
# Ignore some commits not matched by the above
{ message = "^docs: update docs for( ([a-f0-9]{7}))?$", skip = true },
{ message = "^style: format ([a-f0-9]{7})?$", skip = true },
# Regular matches
{ message = "^(.*)!:", group = "<!-- 0 -->🚨 Breaking Changes" },
{ message = "^feat", group = "<!-- 1 -->🚀 Features" },
{ message = "^fix", group = "<!-- 2 -->🐛 Bug Fixes" },
{ message = "^revert", group = "<!-- 3 --> ⏪ Reverted"},
{ message = "^docs", group = "<!-- 4 -->📚 Documentation" },
]
filter_commits = true
[remote.github]
owner = "catppuccin"
repo = "nix"