Skip to content

Commit fae5b53

Browse files
chore: add cliff.toml for changelog generation
1 parent 327e807 commit fae5b53

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

cliff.toml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# configuration file for git-cliff (0.1.0)
2+
3+
[changelog]
4+
# changelog header
5+
header = """
6+
# Changelog\n
7+
All notable changes to this project will be documented in this file.\n
8+
"""
9+
# template for the changelog body
10+
# https://tera.netlify.app/docs/#introduction
11+
body = """
12+
{% if version %}\
13+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
14+
{% else %}\
15+
## [unreleased]
16+
{% endif %}\
17+
{% for group, commits in commits | group_by(attribute="group") %}
18+
### {{ group | striptags | trim | upper_first }}
19+
{% for commit in commits
20+
| filter(attribute="scope")
21+
| sort(attribute="scope") %}
22+
- *({{commit.scope}})*{% if commit.breaking %} [**breaking**]{% endif %} \
23+
{{ commit.message | upper_first }}
24+
{%- endfor -%}
25+
{% raw %}\n{% endraw %}\
26+
{%- for commit in commits %}
27+
{%- if commit.scope -%}
28+
{% else -%}
29+
-{% if commit.breaking %} [**breaking**]{% endif %} \
30+
{{ commit.message | upper_first }}
31+
{% endif -%}
32+
{% endfor -%}
33+
{% endfor %}\n
34+
"""
35+
# remove the leading and trailing whitespace from the template
36+
trim = true
37+
# changelog footer
38+
footer = ""
39+
40+
[git]
41+
# parse the commits based on https://www.conventionalcommits.org
42+
conventional_commits = true
43+
# filter out the commits that are not conventional
44+
filter_unconventional = true
45+
# process each line of a commit as an individual commit
46+
split_commits = false
47+
# regex for parsing and grouping commits
48+
commit_parsers = [
49+
{ message = "^feat", group = "Features"},
50+
{ message = "^fix", group = "Bug Fixes"},
51+
{ message = "^doc", group = "Documentation"},
52+
{ message = "^perf", group = "Performance"},
53+
{ message = "^refactor", group = "Refactor"},
54+
{ message = "^style", group = "Styling"},
55+
{ message = "^test", group = "Testing"},
56+
{ message = "^chore\\(release\\):", skip = true},
57+
{ message = "^chore", group = "Miscellaneous Tasks"},
58+
{ body = ".*security", group = "Security"},
59+
]
60+
# protect breaking changes from being skipped due to matching a skipping commit_parser
61+
protect_breaking_commits = false
62+
# filter out the commits that are not matched by commit parsers
63+
filter_commits = false
64+
# glob pattern for matching git tags
65+
tag_pattern = "v[0-9]*"
66+
# regex for skipping tags
67+
skip_tags = "v0.1.0-beta.1"
68+
# regex for ignoring tags
69+
ignore_tags = ""
70+
# sort the tags topologically
71+
topo_order = false
72+
# sort the commits inside sections by oldest/newest order
73+
sort_commits = "oldest"

0 commit comments

Comments
 (0)