Files
CRSim/cliff.toml
2025-06-09 15:42:43 +08:00

61 lines
2.1 KiB
TOML

[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 %}
* @{{ contributor.username }}
{%- endfor -%}
{%- endif %}
"""
trim = true
footer = "<!-- generated by git-cliff -->"
postprocessors = [{ pattern = "#([0-9]+)", replace = "([#${1}](https://github.com/denglihong2007/CRSim/issues/${1}))"}]
[git]
commit_parsers = [
{ message = "\\[skip cliff\\]", skip = true },
{ message = "^feat", group = "<!-- 0 -->🚀 新功能" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug 修复" },
{ message = "^doc", group = "<!-- 3 -->📚 文档" },
{ message = "^perf", group = "<!-- 4 -->⚡ 性能" },
{ message = "^refactor", group = "<!-- 2 -->🚜 重构" },
{ message = "^style", group = "<!-- 5 -->🎨 界面" },
{ message = "^test", group = "<!-- 6 -->🧪 测试" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ 杂项" },
{ message = "^revert", group = "<!-- 8 -->◀️ 回退" },
{ message = ".*", group = "<!-- 9 -->💼 其它" },
]