forked from ClassIsland/ClassIsland
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
64 lines (57 loc) · 2.14 KB
/
cliff.toml
File metadata and controls
64 lines (57 loc) · 2.14 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[changelog]
header = "Changelog"
body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% macro print_commit(commit) -%}
- {% if commit.scope %}【{{ commit.scope }}】{% endif %}\
{% if commit.breaking %}[**破坏性更改**] {% endif %}\
{{ commit.message | upper_first }}\
{% endmacro -%}
{% for group, commits in commits | group_by(attribute="group") %}
## {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
{{ self::print_commit(commit=commit) }}
{%- endfor %}
{% for commit in commits %}
{%- if not commit.scope -%}
{{ self::print_commit(commit=commit) }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{%- if github -%}
{% if github.contributors | length != 0 %}
## 贡献者
感谢以下贡献者的贡献:
{% endif %}\
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
- @{{ contributor.username }}
{%- endfor -%}
{%- endif %}
"""
trim = true
footer = "<!-- generated by git-cliff -->"
postprocessors = [{ pattern = "#([0-9]+)", replace = "([#${1}](https://github.com/ClassIsland/ClassIsland/issues/${1}))"}]
[git]
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 新增功能与优化" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug 修复" },
{ message = "^doc", skip = true },
{ message = "^perf", group = "<!-- 0 -->🚀 新增功能与优化" },
{ message = "^refactor\\(clippy\\)", skip = true },
{ message = "^refactor", skip = true },
{ message = "^style", skip = true },
{ message = "^test", skip = true },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore\\(npm\\).*yarn\\.lock", skip = true },
{ message = "^chore|^ci", skip = true },
{ body = ".*security", skip = true },
{ message = "^revert", group = "<!-- 9 -->◀️ 回滚的功能" },
]
skip_tags = ".*"