-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathcliff.toml
More file actions
79 lines (75 loc) · 3.35 KB
/
Copy pathcliff.toml
File metadata and controls
79 lines (75 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# git-cliff configuration — generates CHANGELOG.md and GitHub Release notes
# from Conventional Commits. Output follows the Keep a Changelog format.
#
# Local: git-cliff --tag "v$(cat VERSION)" -o CHANGELOG.md (rewrite full file)
# git-cliff --latest --strip header (just newest release, for release notes)
# CI: orhun/git-cliff-action in .github/workflows/release.yml
#
# PR numbers like "(#123)" already live in the commit subjects and GitHub
# auto-links them in CHANGELOG.md and Release notes, so no token/remote
# integration is needed here. Curate contributor shout-outs by hand for
# notable releases.
[changelog]
header = """
# Changelog
All notable changes to this project are documented here.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
"""
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 | striptags | trim | upper_first }}
{% for commit in commits %}\
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}
{% endfor %}\
{% endfor %}\n
"""
footer = """
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: https://github.com/fujibee/agmsg/compare/{{ release.previous.version }}...{{ release.version }}
{% else -%}
[{{ release.version | trim_start_matches(pat="v") }}]: https://github.com/fujibee/agmsg/releases/tag/{{ release.version }}
{% endif -%}
{% endif -%}
{% endfor %}
"""
trim = true
[git]
conventional_commits = true
# Don't auto-drop non-conventional commits — some notable community PRs were
# squash-merged with their PR title as-is (no `feat:`/`fix:` prefix). Instead we
# classify explicitly below and the catch-all rule skips everything unmatched,
# so the log stays curated rather than flooded with merges/initial commits.
filter_unconventional = false
split_commits = false
# Conventional types → Keep a Changelog sections. The `<!-- N -->` prefixes only
# drive section ordering; `striptags` removes them from the rendered heading.
commit_parsers = [
{ message = "^Merge", skip = true },
{ message = "^release", skip = true },
{ message = "^(chore|ci|build|test|style)", skip = true },
{ message = "^feat", group = "<!-- 0 -->Added" },
{ message = "^fix", group = "<!-- 1 -->Fixed" },
{ message = "^perf", group = "<!-- 2 -->Performance" },
{ message = "^refactor", group = "<!-- 3 -->Changed" },
{ message = "^docs", group = "<!-- 4 -->Documentation" },
{ message = "^revert", group = "<!-- 5 -->Reverted" },
# Headline community PRs merged with non-conventional squash subjects:
{ message = "(?i)native windows", group = "<!-- 0 -->Added" },
{ message = "(?i)powershell launcher", group = "<!-- 0 -->Added" },
{ message = "(?i)sandboxed bash tool", group = "<!-- 1 -->Fixed" },
# Everything else (merges, initial commit, misc) is intentionally dropped.
{ message = ".*", skip = true },
]
protect_breaking_commits = true
filter_commits = true
tag_pattern = "v[0-9]*"
topo_order = false
sort_commits = "newest"