90 lines
4.1 KiB
TOML
90 lines
4.1 KiB
TOML
# git-cliff configuration file - 详细版本
|
|
# https://git-cliff.org/docs/configuration
|
|
|
|
[changelog]
|
|
# changelog header
|
|
header = "# Changelog\n\n"
|
|
# template for the changelog body
|
|
# https://keats.github.io/tera/docs/#introduction
|
|
body = """
|
|
{% if version %}\
|
|
## [{{ version }}] - {{ 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 %}
|
|
- **{{ commit.message | upper_first }}**{% if commit.scope %} *({{ commit.scope }})*{% endif %}{% if commit.breaking %} **BREAKING:** {{ commit.breaking_description }}{% endif %}
|
|
- 👤 **提交者**: {{ commit.author.name }}
|
|
- 🕒 **提交时间**: {{ commit.timestamp | date(format="%Y-%m-%d %H:%M:%S") }}
|
|
- 🔗 **提交哈希**: [{{ commit.id | truncate(length=7, end="") }}](https://github.com/InkCanvasForClass/community/commit/{{ commit.id }})
|
|
- 📝 **完整消息**: {{ commit.message }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
"""
|
|
|
|
# template for the changelog footer
|
|
footer = ""
|
|
|
|
# git-cliff internal behavior
|
|
[git]
|
|
# parse the commits using this regex
|
|
commit_parsers = [
|
|
# 带作用域的提交
|
|
{ message = "^feat\\((.+)\\)", group = "✨ Features", scope = "$1" },
|
|
{ message = "^fix\\((.+)\\)", group = "🐛 Bug Fixes", scope = "$1" },
|
|
{ message = "^docs\\((.+)\\)", group = "📚 Documentation", scope = "$1" },
|
|
{ message = "^style\\((.+)\\)", group = "💄 Styling", scope = "$1" },
|
|
{ message = "^refactor\\((.+)\\)", group = "♻️ Code Refactoring", scope = "$1" },
|
|
{ message = "^perf\\((.+)\\)", group = "⚡ Performance", scope = "$1" },
|
|
{ message = "^test\\((.+)\\)", group = "🧪 Tests", scope = "$1" },
|
|
{ message = "^build\\((.+)\\)", group = "🔨 Build System", scope = "$1" },
|
|
{ message = "^ci\\((.+)\\)", group = "👷 Continuous Integration", scope = "$1" },
|
|
{ message = "^chore\\((.+)\\)", group = "🔧 Chores", scope = "$1" },
|
|
{ message = "^revert\\((.+)\\)", group = "⏪ Reverts", scope = "$1" },
|
|
{ message = "^merge\\((.+)\\)", group = "🔀 Merges", scope = "$1" },
|
|
{ message = "^hotfix\\((.+)\\)", group = "🚨 Hotfixes", scope = "$1" },
|
|
{ message = "^security\\((.+)\\)", group = "🔒 Security", scope = "$1" },
|
|
{ message = "^ui\\((.+)\\)", group = "🎨 UI/UX", scope = "$1" },
|
|
{ message = "^api\\((.+)\\)", group = "🔌 API", scope = "$1" },
|
|
{ message = "^config\\((.+)\\)", group = "⚙️ Configuration", scope = "$1" },
|
|
{ message = "^deps\\((.+)\\)", group = "📦 Dependencies", scope = "$1" },
|
|
|
|
# 不带作用域的提交
|
|
{ message = "^feat", group = "✨ Features" },
|
|
{ message = "^fix", group = "🐛 Bug Fixes" },
|
|
{ message = "^docs", group = "📚 Documentation" },
|
|
{ message = "^style", group = "💄 Styling" },
|
|
{ message = "^refactor", group = "♻️ Code Refactoring" },
|
|
{ message = "^perf", group = "⚡ Performance" },
|
|
{ message = "^test", group = "🧪 Tests" },
|
|
{ message = "^build", group = "🔨 Build System" },
|
|
{ message = "^ci", group = "👷 Continuous Integration" },
|
|
{ message = "^chore", group = "🔧 Chores" },
|
|
{ message = "^revert", group = "⏪ Reverts" },
|
|
{ message = "^merge", group = "🔀 Merges" },
|
|
{ message = "^hotfix", group = "🚨 Hotfixes" },
|
|
{ message = "^security", group = "🔒 Security" },
|
|
{ message = "^ui", group = "🎨 UI/UX" },
|
|
{ message = "^api", group = "🔌 API" },
|
|
{ message = "^config", group = "⚙️ Configuration" },
|
|
{ message = "^deps", group = "📦 Dependencies" },
|
|
|
|
# 其他提交
|
|
{ message = "^.*", group = "📋 Other" },
|
|
]
|
|
# protect breaking changes from being skipped due to matching a previous commit
|
|
protect_breaking_commits = false
|
|
# filter out the commits that are not matched by commit parsers
|
|
filter_commits = false
|
|
# glob pattern for matching tags
|
|
tag_pattern = "v[0-9]*"
|
|
# regex for skipping tags
|
|
skip_tags = "^v0\\.1\\.0$"
|
|
# regex for ignoring tags
|
|
ignore_tags = ""
|
|
# sort the tags topologically
|
|
topo_order = false
|
|
# sort the commits inside sections by date
|
|
sort_commits = "newest" |