Skip to content

Commit 2cd18f5

Browse files
authored
Changelog with Git Cliff (#1307)
1 parent ad53cfe commit 2cd18f5

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

cliff.toml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# configuration file for git-cliff (0.1.0)
2+
3+
[changelog]
4+
# changelog header
5+
header = """
6+
# Changelog
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 | upper_first }}
19+
{% for commit in commits %}
20+
- {{ commit.message | upper_first }}\
21+
{% endfor %}
22+
{% endfor %}\n
23+
"""
24+
# remove the leading and trailing whitespaces from the template
25+
trim = true
26+
# changelog footer
27+
footer = """
28+
<!-- generated by git-cliff -->
29+
"""
30+
31+
[git]
32+
# allow only conventional commits
33+
# https://www.conventionalcommits.org
34+
conventional_commits = true
35+
# regex for parsing and grouping commits
36+
commit_parsers = [
37+
{ message = "^feat", group = "Features"},
38+
{ message = "^fix", group = "Bug Fixes"},
39+
{ message = "^doc", group = "Documentation"},
40+
{ message = "^perf", group = "Performance"},
41+
{ message = "^refactor", group = "Refactor"},
42+
{ message = "^style", group = "Styling"},
43+
{ message = "^test", group = "Testing"},
44+
{ message = "^chore\\(release\\): prepare for", skip = true},
45+
{ message = "^chore", group = "Miscellaneous Tasks"},
46+
{ body = ".*security", group = "Security"},
47+
]
48+
# filter out the commits that are not matched by commit parsers
49+
filter_commits = false
50+
# glob pattern for matching git tags
51+
tag_pattern = "v[0-9]*"
52+
# regex for skipping tags
53+
skip_tags = "v0.1.0-beta.1"

0 commit comments

Comments
 (0)