Skip to content

Commit fb86a4c

Browse files
committed
Add git-cliff config for changelog generation
1 parent 1bbb34a commit fb86a4c

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

cliff.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# git-cliff configuration
2+
# https://git-cliff.org/docs/configuration
3+
4+
[changelog]
5+
header = """
6+
# Changelog
7+
8+
All notable changes to this project will be documented in this file.
9+
10+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
11+
and this project adheres to [Semantic Versioning](https://semver.org/).
12+
13+
"""
14+
body = """
15+
{% if version %}\
16+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
17+
{% else %}\
18+
## [Unreleased]
19+
{% endif %}\
20+
{% for group, commits in commits | group_by(attribute="group") %}
21+
22+
### {{ group | upper_first }}
23+
{% for commit in commits %}
24+
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first | trim }}{% if commit.links %} ({{ commit.links | join(sep=", ") }}){% endif %}\
25+
{% endfor %}\
26+
{% endfor %}
27+
28+
"""
29+
footer = """
30+
"""
31+
trim = true
32+
33+
[git]
34+
conventional_commits = true
35+
filter_unconventional = true
36+
commit_parsers = [
37+
{ message = "^WIP", skip = true },
38+
{ message = "^[a-z]+!:", group = "🚨 Breaking Changes" },
39+
{ message = "^sec", group = "🔒 Security" },
40+
{ message = "^feat", group = "✨ New Features" },
41+
{ message = "^fix", group = "🐛 Bug Fixes" },
42+
{ message = "^refactor", group = "♻️ Refactoring" },
43+
{ message = "^perf", group = "⚡ Performance" },
44+
{ message = "^docs", group = "📝 Documentation" },
45+
{ message = "^test", group = "🧪 Tests" },
46+
{ message = "^chore", group = "🔧 Chores" },
47+
{ message = "^(build|ci)", group = "📦 Dependencies" },
48+
]
49+
tag_pattern = "v[0-9]*"
50+
skip_tags = ""
51+
ignore_tags = ""

0 commit comments

Comments
 (0)