-
-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathcliff.toml
More file actions
199 lines (158 loc) · 6.71 KB
/
cliff.toml
File metadata and controls
199 lines (158 loc) · 6.71 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
# 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.
"""
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 | 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 | 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 = []
[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 changelog update commits (must come before other parsers)
{ message = "^[a-zA-Z]+: update changelog for", skip = true },
{ message = "update changelog for", skip = true },
{ message = "\\[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 = "bump version.*to", skip = true },
{ message = "update version.*number", skip = true },
{ message = "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 },
# 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 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]+)"
# Regex to exclude commits from the changelog (matches your current config)
exclude_patterns = [
"chore\\(release\\):",
"bump version",
"update version",
"version bump",
"release v?\\d+\\.\\d+\\.\\d+",
"chore.*version",
"chore.*release",
"build.*version",
"update.*version.*number",
"bump.*version.*to",
"update homebrew",
"Update changelog for",
"update changelog for",
"\\[skip ci\\]",
"Merge branch",
# Exclude merge commits - we want to show the original commits with their actual authors
"Merge pull request",
]
# 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