-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
109 lines (95 loc) · 3.75 KB
/
cliff.toml
File metadata and controls
109 lines (95 loc) · 3.75 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
# git-cliff configuration for la-stack
# https://git-cliff.org/docs/configuration
[changelog]
# Keep a Changelog header
header = """
# Changelog\n
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).\n
"""
# Tera template for each release section
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 %}
- {% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | split(pat="\n") | first | upper_first | trim }} \
[`{{ commit.id | truncate(length=7, end="") }}`]\
(https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/commit/{{ commit.id }})
{%- endfor %}
{% endfor %}\n
"""
# Compare-link footer (requires [remote.github] below)
footer = """
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: \
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/compare/{{ release.previous.version }}..{{ release.version }}
{% else -%}
[{{ release.version | trim_start_matches(pat="v") }}]: \
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/tree/{{ release.version }}
{% endif -%}
{% else -%}
[unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/compare/{{ release.previous.version }}..HEAD
{% endif -%}
{% endfor -%}
"""
trim = true
# Collapse 3+ consecutive newlines into exactly 2 (one blank line).
# This prevents MD012 violations from Tera template whitespace artifacts.
postprocessors = [
{ pattern = '\n{3,}', replace = "\n\n" },
]
[git]
conventional_commits = true
# Include non-conventional commits so we capture la-stack's full history
# (mixed styles: "feat:", "Changed:", plain merge commits, dependabot bumps).
filter_unconventional = false
filter_commits = false
protect_breaking_commits = true
tag_pattern = "v[0-9]*"
topo_order = false
sort_commits = "oldest"
# Link (#N) references to GitHub PRs before rendering.
commit_preprocessors = [
{ pattern = '\(#(\d+)\)', replace = '[#${1}](https://github.com/acgetchell/la-stack/pull/${1})' },
]
commit_parsers = [
# Skip merge commits and bot noise from the changelog body
{ message = "^Merge pull request", skip = true },
{ message = "^Merge branch", skip = true },
# Conventional commit types
{ message = "^feat", group = "Added" },
{ message = "^fix", group = "Fixed" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Changed" },
{ message = "^docs?", group = "Documentation" },
{ message = "^test", group = "Changed" },
{ message = "^style", group = "Changed" },
# Dependabot / dependency bumps
{ message = "^[Bb]ump ", group = "Dependencies" },
# Non-conventional patterns used in la-stack history
{ message = "^[Aa]dd", group = "Added" },
{ message = "^[Ss]upport", group = "Added" },
{ message = "^[Rr]emove", group = "Removed" },
{ message = "^[Dd]elete", group = "Removed" },
{ message = "^[Cc]hange", group = "Changed" },
# Chore / CI
{ message = "^chore|^ci", group = "Maintenance" },
# Catch-all
{ message = ".*", group = "Changed" },
]
[remote.github]
owner = "acgetchell"
repo = "la-stack"