Skip to content

Commit fc00939

Browse files
committed
chore: add git-cliff configuration for automated changelogs
1 parent 7373e6e commit fc00939

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

‎cliff.toml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[changelog]
2+
header = """
3+
# Changelog
4+
5+
All notable changes to this project will be documented in this file.
6+
7+
"""
8+
body = """
9+
{% if version %}
10+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
11+
{% else %}
12+
## [unreleased]
13+
{% endif %}
14+
15+
{% for group, commits in commits | group_by(attribute="group") %}
16+
### {{ group | upper_first }}
17+
{% for commit in commits %}
18+
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/{{ github.owner }}/{{ github.repo }}/commit/{{ commit.id }}))
19+
{% endfor %}
20+
{% endfor %}
21+
"""
22+
trim = true
23+
24+
[git]
25+
conventional_commits = true
26+
filter_unconventional = true
27+
commit_parsers = [
28+
{ message = "^feat", group = "🚀 Features" },
29+
{ message = "^fix", group = "🐛 Bug Fixes" },
30+
{ message = "^doc", group = "📚 Documentation" },
31+
{ message = "^perf", group = "⚡ Performance" },
32+
{ message = "^chore", group = "⚙️ Miscellaneous" },
33+
]
34+
tag_pattern = "v[0-9]*"

0 commit comments

Comments
 (0)