[changelog]
# git-cliff 配置 — 基于 Conventional Commits 自动生成 Release Notes
header = ""
body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group }}
{% for commit in commits %}
- {{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end="") }})
{%- endfor %}

{% endfor %}
"""
trim = true

[git]
conventional_commits = true
filter_unconventional = true
split_commits = false
# 按 Conventional Commits 类型分组
commit_parsers = [
    { message = "^feat", group = "🚀 Features" },
    { message = "^fix", group = "🐛 Bug Fixes" },
    { message = "^perf", group = "⚡ Performance" },
    { message = "^refactor", group = "♻️ Refactoring" },
    { message = "^docs", group = "📝 Documentation" },
    { message = "^style", group = "💄 Styling" },
    { message = "^test", group = "✅ Testing" },
    { message = "^ci", group = "🔧 CI/CD" },
    { message = "^build", group = "🔧 Build System" },
    { message = "^chore", group = "🏗️ Chores" },
    { message = ".*", group = "📦 Other Changes" },
]
filter_commits = false
tag_pattern = "v[0-9].*"
topo_order = false
sort_commits = "oldest"
