-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcliff.toml
More file actions
127 lines (113 loc) · 4.38 KB
/
cliff.toml
File metadata and controls
127 lines (113 loc) · 4.38 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
# git-cliff configuration for AccessiWeather
# https://git-cliff.org/docs/configuration
# Format: Keep a Changelog (https://keepachangelog.com/en/1.0.0/)
[changelog]
# Header with Keep a Changelog reference
header = """
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
"""
# Body template - clean entries without PR links
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 | upper_first }}
{% for commit in commits %}
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}
{% endfor %}
{% endfor %}
"""
# Footer with version comparison links
footer = """
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: https://github.com/Orinks/AccessiWeather/compare/{{ release.previous.version }}...{{ release.version }}
{% else -%}
[{{ release.version | trim_start_matches(pat="v") }}]: https://github.com/Orinks/AccessiWeather/releases/tag/{{ release.version }}
{% endif -%}
{% else -%}
[Unreleased]: https://github.com/Orinks/AccessiWeather/compare/{{ release.previous.version }}...HEAD
{% endif -%}
{% endfor %}
"""
trim = true
postprocessors = []
[git]
# Parse conventional commits
conventional_commits = true
# Include non-conventional commits too
filter_unconventional = false
# Process commits normally
split_commits = false
# Clean up commit messages
commit_preprocessors = [
# Remove issue/PR numbers from messages for cleaner display
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
# Remove trailing periods
{ pattern = '\.+$', replace = "" },
]
# Map commits to Keep a Changelog groups
commit_parsers = [
# Skip noise - merge commits and reverts
{ message = "^Merge", skip = true },
{ message = "^merge", skip = true },
{ message = "^[Rr]evert", skip = true },
# Skip noise - conventional commit types users don't care about
{ message = "^chore\\(release\\)", skip = true },
{ message = "^chore\\(deps\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^ci", skip = true },
{ message = "^build", skip = true },
{ message = "^chore", skip = true },
{ message = "^style", skip = true },
{ message = "^test", skip = true },
# NOTE: avoid broad keyword-based skip rules here.
# They can hide valid squash commits when those words appear in PR body text.
# Added - new features
{ message = "^feat", group = "Added" },
{ message = "^[a|A]dd", group = "Added" },
{ message = "^[s|S]upport", group = "Added" },
{ message = "^.*: add", group = "Added" },
{ message = "^.*: support", group = "Added" },
# Fixed - bug fixes (user-facing only)
{ message = "^fix", group = "Fixed" },
{ message = "^.*: fix", group = "Fixed" },
{ message = "^hotfix", group = "Fixed" },
# Removed
{ message = "^[r|R]emove", group = "Removed" },
{ message = "^.*: remove", group = "Removed" },
{ message = "^.*: delete", group = "Removed" },
{ message = "^deprecate", group = "Deprecated" },
# Security
{ body = ".*security", group = "Security" },
{ message = "^security", group = "Security" },
# Changed - only conventional commits that aren't caught above
{ message = "(?i)refactor.*build", skip = true },
{ message = "(?i)refactor.*[Pp]hase", skip = true },
{ message = "^refactor", group = "Changed" },
{ message = "^perf", group = "Changed" },
# Skip everything else - if it's not conventional, it's probably dev noise
{ message = "^.*", skip = true },
]
# Protect breaking changes
protect_breaking_commits = true
# Filter out skipped commits
filter_commits = true
# Show oldest first within groups (chronological)
sort_commits = "oldest"
# Link parsers
link_parsers = [
{ pattern = "#(\\d+)", href = "https://github.com/Orinks/AccessiWeather/issues/$1" },
]
# GitHub integration
[remote.github]
owner = "Orinks"
repo = "AccessiWeather"