Repository navigation
Expand file tree
/
Copy pathcliff.toml
More file actions
230 lines (186 loc) · 9.46 KB
/
Copy pathcliff.toml
File metadata and controls
230 lines (186 loc) · 9.46 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# git-cliff configuration file
# https://git-cliff.org/docs/configuration
[changelog]
# Template for the changelog
header = """
# Changelog
All notable changes to vtcode will be documented in this file.
<!-- markdownlint-disable MD012 MD013 MD024 MD033 -->
<!-- Rules relaxed for this generated file only: MD012 (a full regeneration leaves one blank line at end-of-file), MD013 (commit subjects are unbounded so entries can exceed 120 columns), MD024 (two tags can normalize to the same version heading), MD033 (commit subjects may contain `<Type>` spellings). -->
"""
# NOTE: The body below is written so that `markdownlint` (see
# `docs/development/markdown-quality.md`) passes on regenerated output:
# - MD022: headings are surrounded by exactly one blank line.
# - MD032: lists are surrounded by exactly one blank line.
# - MD009: the author space lives inside the `{% if %}`, so a missing remote
# username can never leave a trailing space.
# - MD012: no block emits two blank lines, so consecutive groups and versions
# stay single-spaced.
# git-cliff's `\` line-continuation swallows the newline that follows it AND any
# blank lines / indentation after it, up to the next non-whitespace character.
# A blank line therefore survives only when the preceding line does NOT end with
# `\`. Re-run `git-cliff --config cliff.toml -o /tmp/changelog.md` and lint the
# result when editing this template.
body = """
{% if version %}\
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}
### Highlights
{% for group, commits in commits | group_by(attribute="group") %}\
{% if group == "Features" or group == "Bug Fixes" or group == "Documentation" %}\
#### {{ group | upper_first }}
{% for commit in commits %}\
- {{ commit.message | split(pat="\n") | first | trim | upper_first }} ({% if commit.id %}{{ commit.id | truncate(length=8, end="") }}{% else %}unknown{% endif %}){% if commit.remote.username %} (@{{ commit.remote.username }}){% endif %}
{% endfor %}
{% endif %}\
{% endfor %}\
### Other Changes
{% for group, commits in commits | group_by(attribute="group") %}\
{% if group != "Features" and group != "Bug Fixes" and group != "Documentation" %}\
#### {{ group | upper_first }}
{% for commit in commits %}\
- {{ commit.message | split(pat="\n") | first | trim | upper_first }} ({% if commit.id %}{{ commit.id | truncate(length=8, end="") }}{% else %}unknown{% endif %}){% if commit.remote.username %} (@{{ commit.remote.username }}){% endif %}
{% endfor %}
{% endif %}\
{% endfor %}\
"""
footer = ""
# Remove leading and trailing whitespace from the template
trim = true
# Postprocessors for changelog entries
postprocessors = [
# Collapse accidental double blank lines inside generated entries so the
# output stays MD012-clean. Applied per release section, so it must not
# touch the single separator blank that follows each section.
{ pattern = '\n{3,}', replace = "\n\n" },
]
[git]
# Parse commits according to conventional commits format
conventional_commits = true
# Exclude commits that don't follow conventional commits format
filter_unconventional = false
# Split commits by newlines
split_commits = false
# Preprocess commit messages before parsing
commit_preprocessors = [
# Remove issue/PR references from the end of commit messages to avoid duplication
{ pattern = '\((https://github.com/vinhnx/vtcode/pull/\d+)\)', replace = "" },
{ pattern = '\(#\d+\)', replace = "" },
# Normalize common non-standard commit prefixes (case-insensitive)
{ pattern = '^[Dd]ocs:', replace = "docs:" },
{ pattern = '^[Ff]eat:', replace = "feat:" },
{ pattern = '^[Ff]ix:', replace = "fix:" },
{ pattern = '^[Rr]efactor:', replace = "refactor:" },
{ pattern = '^[Tt]est:', replace = "test:" },
{ pattern = '^[Bb]uild:', replace = "build:" },
{ pattern = '^[Cc]I:', replace = "ci:" },
{ pattern = '^[Pp]erf:', replace = "perf:" },
{ pattern = '^[Cc]hore:', replace = "chore:" },
# Truncate commits that have multiple conventional commit prefixes (malformed)
{ pattern = '\s+(feat|fix|docs|refactor|test|build|ci|perf|chore|deps|security):.*$', replace = "" },
]
# Protect commits from being parsed (e.g., version bumps, release commits)
commit_parsers = [
# Skip owner-only TODO churn (docs/project/TODO.md) to reduce release noise.
# Must come before type grouping so `docs: update project TODO` etc. don't
# leak into Documentation/Other sections.
#
# NOTE: git-cliff matches commit_parsers against the
# FULL commit message (subject + body). An unanchored pattern such as
# `TODO\.md` therefore dropped real commits whose body merely mentions the
# file (e.g. merge-conflict notes like "# Conflicts: docs/project/TODO.md").
# Every skip pattern below is anchored to the subject line: `^` matches
# message start and `[^\n]*` cannot cross a newline, so a match never
# extends into the body.
{ message = "(?i)^update[^\\n]*todo", skip = true },
{ message = "(?i)^docs\\(todos?\\)", skip = true },
{ message = "(?i)^docs\\(project\\)[^\\n]*todo", skip = true },
{ message = "(?i)^docs: update[^\\n]*todo", skip = true },
{ message = "(?i)^update project$", skip = true },
# Skip bare non-conventional Update... subjects (owner maintenance noise
# such as "Update README", "Update docs", "Update TODO"). Anchored to the
# subject line (see the NOTE above). Conventional commits are unaffected:
# they start with a `type:` prefix, never with "update".
{ message = "(?i)^updates?(\\s|:|$)", skip = true },
# Skip changelog update commits (must come before other parsers)
{ message = "(?i)^[^\\n]*update changelog for", skip = true },
{ message = "^[^\\n]*\\[skip ci\\]", skip = true },
# Skip release and version bump commits (be specific to avoid false positives)
{ message = "^chore\\(release\\):", skip = true },
{ message = "^chore: Release$", skip = true },
{ message = "^chore: update homebrew", skip = true },
{ message = "^[^\\n]*bump version.*to", skip = true },
{ message = "^[^\\n]*update version.*number", skip = true },
{ message = "^[^\\n]*version bump", skip = true },
# Skip merge commits - show original commits with their actual authors instead
{ message = "^Merge pull request", skip = true },
{ message = "^Merge branch", skip = true },
# New LLM providers/models are user-facing feature highlights even when the
# commit message is non-conventional (for example: "Add StepFun provider and model integration").
{ message = "^[Aa]dd .* provider.* model", group = "Features", skip = false },
{ message = "^[Aa]dd .* model.* provider", group = "Features", skip = false },
# Features
{ message = "^feat", group = "Features", skip = false },
{ message = "^feat\\(.*\\):", group = "Features", skip = false },
# Bug Fixes
{ message = "^fix", group = "Bug Fixes", skip = false },
{ message = "^fix\\(.*\\):", group = "Bug Fixes", skip = false },
# Performance
{ message = "^perf", group = "Performance", skip = false },
{ message = "^perf\\(.*\\):", group = "Performance", skip = false },
# Refactors
{ message = "^refactor", group = "Refactors", skip = false },
{ message = "^refactor\\(.*\\):", group = "Refactors", skip = false },
# Security
{ message = "^security", group = "Security", skip = false },
{ message = "^security\\(.*\\):", group = "Security", skip = false },
# Documentation
{ message = "^docs", group = "Documentation", skip = false },
{ message = "^docs\\(.*\\):", group = "Documentation", skip = false },
# Tests
{ message = "^test", group = "Tests", skip = false },
{ message = "^test\\(.*\\):", group = "Tests", skip = false },
# Build
{ message = "^build", group = "Build", skip = false },
{ message = "^build\\(.*\\):", group = "Build", skip = false },
# CI
{ message = "^ci", group = "CI", skip = false },
{ message = "^ci\\(.*\\):", group = "CI", skip = false },
# Dependencies
{ message = "^deps", group = "Dependencies", skip = false },
{ message = "^deps\\(.*\\):", group = "Dependencies", skip = false },
# Chores (excluded from changelog by default)
{ message = "^chore", group = "Chores", skip = true },
{ message = "^chore\\(.*\\):", group = "Chores", skip = true },
# Skip commits whose subject only touches the TODO tracker file.
# Anchored to the subject line (see the NOTE above) so bodies that merely
# mention TODO.md (merge-conflict notes) cannot drop the commit.
{ message = "^[^\\n]*TODO\\.md", skip = true },
# Skip generic/non-descriptive commits
{ message = "^Update commit$", skip = true },
{ message = "^Remove codes$", skip = true },
{ message = "^Implement code changes", skip = true },
# Catch-all for other commits (not skipped, grouped as Other)
{ message = ".*", group = "Other", skip = false },
]
# Protect specific commits from being included in the changelog
protect_breaking_commits = false
# Filter out commits
filter_commits = true
# Tags configuration - match both v0.82.0 and 0.82.0 formats
tag_pattern = "[vV]?[0-9]+\\.[0-9]+\\.[0-9]+"
# Pattern to match tags with optional 'v' prefix
tag_regex = "(?P<version>[vV]?[0-9]+\\.[0-9]+\\.[0-9]+)"
# Sort commits within a tag
sort_commits = "oldest"
# Link to remote repository (GitHub)
remote = "github"
# Remote configuration
[remote.github]
owner = "vinhnx"
repo = "vtcode"
[gitmoji]
# Enable gitmoji parsing
enable = false