|
| 1 | +[changelog] |
| 2 | +body = """ |
| 3 | +
|
| 4 | +## 插件更新 |
| 5 | +> [!NOTE] |
| 6 | +> 当前版本:`{% if version %}({{ version }}){%- endif -%}` |
| 7 | +
|
| 8 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 9 | +
|
| 10 | +{% if group != "✨ 新亮点" %} |
| 11 | +<details> |
| 12 | +<summary><h3>{{ group | upper_first }}</h3></summary> |
| 13 | +{% for commit in commits | unique(attribute="message") %} |
| 14 | +- {% if commit.scope %}{{ commit.scope }}: {%- endif -%}{{ commit.message | upper_first }}\ |
| 15 | + {% if commit.remote.username %} 作者: @{{ commit.remote.username }}{%- endif -%} |
| 16 | +{% endfor %} |
| 17 | +</details> |
| 18 | +{% else %} |
| 19 | +### {{ group | upper_first }} |
| 20 | +{% for commit in commits | unique(attribute="message") %} |
| 21 | +- {% if commit.scope %}{{ commit.scope }}: {%- endif -%}{{ commit.message | upper_first }}\ |
| 22 | + {% if commit.remote.username %} 作者: @{{ commit.remote.username }}{%- endif -%} |
| 23 | +{% endfor %} |
| 24 | +{% endif %} |
| 25 | +
|
| 26 | +{% endfor -%} |
| 27 | +
|
| 28 | +{% if version %} |
| 29 | + {% if previous.version %} |
| 30 | +**完整 Changelog**: 版本对比 {{ previous.version }} → {{ version }} |
| 31 | + {% endif %} |
| 32 | +{% else -%} |
| 33 | + {% raw %} |
| 34 | +{% endraw %} |
| 35 | +{% endif %} |
| 36 | +
|
| 37 | +""" |
| 38 | +trim = true |
| 39 | +footer = "<!-- generated by git-cliff -->" |
| 40 | +output = "CHANGELOG.md" |
| 41 | + |
| 42 | + |
| 43 | +[git] |
| 44 | +conventional_commits = true |
| 45 | +filter_unconventional = true |
| 46 | +split_commits = false |
| 47 | +commit_parsers = [ |
| 48 | + { message = "^feat", group = "✨ 新亮点"}, |
| 49 | + { message = "^fix", group = "🛠️ 修复的问题"}, |
| 50 | + { message = "^refactor", group = "🔃 功能重构"}, |
| 51 | + { message = "^docs", group = "📄 文档更新"}, |
| 52 | + { message = "^style", group = "🏞️ 样式优化"}, |
| 53 | +] |
| 54 | +protect_breaking_commits = false |
| 55 | +filter_commits = true |
| 56 | +topo_order = false |
| 57 | +sort_commits = "oldest" |
| 58 | +link_parsers = [] |
0 commit comments