-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcliff.toml
More file actions
102 lines (97 loc) · 4.88 KB
/
Copy pathcliff.toml
File metadata and controls
102 lines (97 loc) · 4.88 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# cliff.toml — git-cliff configuration for CHANGELOG generation.
#
# Synced from the rhiza `core` bundle. Drives `make changelog`, which runs
# `uvx git-cliff --output CHANGELOG.md`.
#
# This template is intentionally forge-agnostic: it does not hard-code an
# owner/repo. Pull-request and issue references like `(#123)` are left intact
# in the generated entries, and both GitHub and GitLab auto-link bare `#123`
# references when rendering Markdown inside a repository. Downstream projects
# that want richer links (full URLs, contributor handles) can enable
# git-cliff's remote integration — see https://git-cliff.org/docs/integration.
#
# Reference: https://git-cliff.org/docs/configuration
[changelog]
# A markdown header rendered once at the top of the changelog.
header = """
# Changelog
All notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com),
and entries are generated from [Conventional Commits](https://www.conventionalcommits.org).
"""
# The body is a Tera template rendered once per release.
# https://keats.github.io/tera/docs/#introduction
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 %}\
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | split(pat="\n") | first | trim | upper_first }}
{% endfor %}\
{% endfor %}\n
"""
footer = """
<!-- generated by git-cliff -->
"""
# Trim leading/trailing whitespace from the rendered body.
trim = true
[git]
# Parse commits according to the Conventional Commits spec.
conventional_commits = true
# Keep non-conventional commits too, grouped under "Other Changes".
filter_unconventional = false
# Do not split a commit into multiple entries on newlines.
split_commits = false
# Do not drop commits that fail to match a parser below.
filter_commits = false
# Skip merge commits.
filter_merge_commits = true
# Match release tags (v1.2.3, v0.5.1, ...).
tag_pattern = "v[0-9].*"
# Order commits within a section oldest-first.
sort_commits = "oldest"
# Group commits into changelog sections. The leading HTML comment controls the
# section ordering and is stripped from the rendered heading via `striptags`.
commit_parsers = [
# Drop automated noise commits that don't provide user-facing signal -- the machine-written
# `Update the compiled paper [skip ci]` kind, which puts the marker in its *subject*.
#
# Anchored to the subject line, and that is load-bearing rather than tidy. git-cliff matches
# this against the whole message, so the unanchored `.*\[skip ci\].*` also dropped any commit
# whose *body* merely mentioned the marker -- a commit message quoting the format of another
# commit message is enough. That silently ate `feat: give the paper branch a README` (#1626)
# out of v1.6.0's notes, for one backticked mention twenty lines down. Same failure as the
# `bump` alternative below: a substring search treating a mention as the thing itself.
#
# `^` with no `(?m)` is start-of-message, and `[^\n]*` cannot cross a newline, so only the
# subject can match.
{ message = "^[^\\n]*\\[skip ci\\]", skip = true },
# Only the release flow's own commits. A bare `bump` alternative here also ate every
# `chore(deps): bump <dependency>` — the rhiza-hooks v1.2.0 bump (#1487) vanished from
# v1.3.2's notes that way, and had been vanishing for a while unnoticed: a Dependabot
# subject escapes by the accident of its doubled `(deps)(deps)` scope, and #1482's
# identical bump survived only because it was typed `fix(deps):`. So this names
# `release` and the older `bump version` form explicitly rather than `bump` at large.
{ message = "^chore(\\([^)]+\\))?:\\s*release\\b", skip = true },
{ message = "^chore(\\([^)]+\\))?:\\s*bump version\\b", skip = true },
{ message = "^chore:\\s*update changelog\\.md\\b", skip = true },
{ message = "^feat", group = "<!-- 0 -->New Features" },
{ message = "^fix", group = "<!-- 1 -->Bug Fixes" },
{ message = "^docs?", group = "<!-- 2 -->Documentation" },
{ message = "^perf", group = "<!-- 3 -->Performance" },
{ message = "^(build|chore)\\(deps[^)]*\\):", group = "<!-- 4 -->Dependencies" },
{ message = "^refactor", group = "<!-- 5 -->Maintenance" },
{ message = "^style", group = "<!-- 5 -->Maintenance" },
{ message = "^chore", group = "<!-- 5 -->Maintenance" },
{ message = "^build", group = "<!-- 5 -->Maintenance" },
{ message = "^ci", group = "<!-- 5 -->Maintenance" },
{ message = "^test", group = "<!-- 5 -->Maintenance" },
{ message = "^revert", group = "<!-- 6 -->Reverts" },
{ message = ".*", group = "<!-- 7 -->Other Changes" },
]