-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
98 lines (94 loc) · 4.18 KB
/
Copy pathcliff.toml
File metadata and controls
98 lines (94 loc) · 4.18 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
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
#
# Generates a "Keep a Changelog"-style CHANGELOG.md from Conventional Commits.
# Section order follows keepachangelog.com: Added, Changed, Deprecated,
# Removed, Fixed, Security (Documentation is appended as an extra section).
# The "<!-- N -->" prefixes on group names only control ordering; they are
# stripped from the rendered headings via the `striptags` filter.
[changelog]
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
"""
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 | upper_first | trim }}\
{% endfor %}
{% endfor %}\n
"""
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 -%}
{% if release.previous.version -%}
[unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/compare/{{ release.previous.version }}..HEAD
{% else -%}
[unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/commits
{% endif -%}
{% endif -%}
{% endfor %}
<!-- generated by git-cliff -->
"""
trim = true
# Pin the remote explicitly so the footer's compare/tree links are
# deterministic. Auto-detection from the origin URL can fail transiently
# (e.g. a remote/API lookup hiccup during `task release`), which renders the
# owner/repo as empty and produces broken `https://github.com///compare/...`
# links.
[remote.github]
owner = "peczenyj"
repo = "runtimevar-consul"
[git]
conventional_commits = true
# Keep non-conventional commits too; the prose fallbacks below route them.
filter_unconventional = false
filter_commits = false
topo_order = false
sort_commits = "oldest"
commit_parsers = [
# Drop merge commits so they never leak into the changelog.
{ message = "^Merge", skip = true },
# --- Conventional Commit types (preferred) ---
{ message = "^feat", group = "<!-- 0 -->Added" },
{ message = "^perf", group = "<!-- 1 -->Changed" },
{ message = "^refactor", group = "<!-- 1 -->Changed" },
{ message = "^style", group = "<!-- 1 -->Changed" },
{ message = "^revert", group = "<!-- 1 -->Changed" },
{ message = "^deprecat", group = "<!-- 2 -->Deprecated" },
{ message = "^remove", group = "<!-- 3 -->Removed" },
{ message = "^fix", group = "<!-- 4 -->Fixed" },
{ message = "^security", group = "<!-- 5 -->Security" },
{ message = "^docs", group = "<!-- 6 -->Documentation" },
# Housekeeping types are not user-facing: keep them out of the changelog.
{ message = "^(chore|ci|build|test)(\\(|:|!)", skip = true },
# --- Prose fallbacks for non-conventional history ---
{ message = "^[Ii]nitial", group = "<!-- 0 -->Added" },
{ message = "^([Aa]dd|[Ss]upport)", group = "<!-- 0 -->Added" },
{ message = "^.*: ([Aa]dd|[Ss]upport)", group = "<!-- 0 -->Added" },
{ message = "^[Rr]emove", group = "<!-- 3 -->Removed" },
{ message = "^([Ff]ix|.*: [Ff]ix)", group = "<!-- 4 -->Fixed" },
{ message = ".*", group = "<!-- 1 -->Changed" },
]