|
| 1 | +# git-cliff configuration file |
| 2 | +# https://git-cliff.org/docs/configuration |
| 3 | + |
| 4 | +[changelog] |
| 5 | +header = """ |
| 6 | +# Changelog |
| 7 | +
|
| 8 | +All notable changes to this project will be documented in this file. |
| 9 | +""" |
| 10 | +body = """ |
| 11 | +{% if version %}\ |
| 12 | +## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 13 | +{% else %}\ |
| 14 | +## [unreleased] |
| 15 | +{% endif %}\ |
| 16 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 17 | +### {{ group | upper_first }} |
| 18 | +{% for commit in commits %} |
| 19 | +- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} |
| 20 | +{%- endfor %} |
| 21 | +{% endfor %}\n |
| 22 | +""" |
| 23 | +trim = true |
| 24 | +footer = "" |
| 25 | + |
| 26 | +[git] |
| 27 | +conventional_commits = true |
| 28 | +filter_unconventional = true |
| 29 | +split_commits = false |
| 30 | +commit_preprocessors = [] |
| 31 | +commit_parsers = [ |
| 32 | + { message = "^feat", group = "新增" }, |
| 33 | + { message = "^fix", group = "修复" }, |
| 34 | + { message = "^docs", group = "文档" }, |
| 35 | + { message = "^perf", group = "性能" }, |
| 36 | + { message = "^refactor", group = "重构" }, |
| 37 | + { message = "^style", group = "格式" }, |
| 38 | + { message = "^test", group = "测试" }, |
| 39 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 40 | + { message = "^chore.*version", skip = true }, |
| 41 | + { message = "^chore", group = "其他" }, |
| 42 | + { body = ".*security", group = "安全" }, |
| 43 | +] |
| 44 | +protect_breaking_commits = false |
| 45 | +filter_commits = false |
| 46 | +tag_pattern = "v[0-9]*" |
| 47 | +skip_tags = "" |
| 48 | +ignore_tags = "" |
| 49 | +topo_order = false |
| 50 | +sort_commits = "oldest" |
| 51 | + |
0 commit comments