-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcliff.toml
59 lines (55 loc) · 1.92 KB
/
cliff.toml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
[changelog]
# 设置变更日志的标题
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# 设置每个版本的模板
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# 删除一些不需要的分组
trim = true
# 排除一些 commit
exclude_path = "^(internal)/"
[git]
# 允许使用常规 commit
conventional_commits = true
# 解析 commit 信息的正则表达式
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor\\(clippy\\)", skip = true },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ body = ".*security", group = "<!-- 7 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 8 -->◀️ Revert" },
]
# 解析 commit 作者的正则表达式
commit_author_parsers = [{ name = ".*", signature = "" }]
# 不匹配的提交将被过滤掉
filter_commits = true
# 忽略一些 commit
ignore_tags = "^v0\\."
# 标签前缀
tag_pattern = "v[0-9]*"
[git.filter]
# 提交消息中的关键词
commit_message = "^(feat|fix|doc|perf|refactor|style|test|security|revert)"
# 提交的文件路径
commit_files = []