-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
35 lines (32 loc) · 1.16 KB
/
cliff.toml
File metadata and controls
35 lines (32 loc) · 1.16 KB
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
# git-cliff configuration file
# https://git-cliff.org/docs/configuration
[changelog]
# 头部模板
header = """
# Changelog\n
"""
# 提交信息模板
body = """
{% for group, commits in commits | group_by(attribute="group") -%}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits -%}
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | split(pat="\n") | first | trim | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/Misty02600/PeekAPI/commit/{{ commit.id }})){% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/Misty02600/PeekAPI/pull/{{ commit.remote.pr_number }}){% endif %}
{% endfor %}
{% endfor -%}
"""
# 移除尾部空白
trim = true
# 底部模板
footer = ""
# 后处理器
postprocessors = []
[git]
# 提交分组
commit_parsers = [
{ message = "^feat", group = "✨ Features" },
{ message = "^fix", group = "🐛 Fixes" },
]
# 保护不匹配的破坏性提交
protect_breaking_commits = true
# 只保留能被 commit_parsers 匹配到的提交
filter_commits = true