| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- # git-cliff configuration file
- # https://git-cliff.org/docs/configuration
- [changelog]
- # changelog header
- header = """
- # Changelog
- All notable changes to this project will be documented in this file.
- """
- # template for the changelog body
- body = """
- {% if version %}\
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
- {% else %}\
- ## [unreleased]
- {% endif %}\
- {% for group, commits in commits | group_by(attribute="group") %}
- ### {{ group | upper_first }}
- {% for commit in commits %}
- - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}
- {%- endfor %}
- {% endfor %}\n
- """
- # remove the leading and trailing whitespace from the template
- trim = true
- # changelog footer
- footer = """
- """
- [git]
- # parse the commits based on https://www.conventionalcommits.org
- conventional_commits = true
- # filter out the commits that are not conventional
- filter_unconventional = true
- # process each line of a commit as an individual commit
- split_commits = false
- # regex for preprocessing the commit messages
- commit_preprocessors = []
- # regex for parsing and grouping commits
- commit_parsers = [
- { message = "^feat", group = "新功能" },
- { message = "^fix", group = "Bug 修复" },
- { message = "^docs", group = "文档更新" },
- { message = "^perf", group = "性能优化" },
- { message = "^refactor", group = "代码重构" },
- { message = "^style", group = "代码格式" },
- { message = "^test", group = "测试" },
- { message = "^chore\\(release\\): prepare for", skip = true },
- { message = "^chore.*version", skip = true },
- { message = "^chore", group = "其他变更" },
- { body = ".*security", group = "安全修复" },
- ]
- # protect breaking changes from being skipped due to matching a skipping commit_parser
- protect_breaking_commits = false
- # filter out the commits that are not matched by commit parsers
- filter_commits = false
- # glob pattern for matching git tags
- tag_pattern = "v[0-9]*"
- # regex for skipping tags
- skip_tags = ""
- # regex for ignoring tags
- ignore_tags = ""
- # sort the tags topologically
- topo_order = false
- # sort the commits inside sections by oldest/newest order
- sort_commits = "oldest"
|