-
Notifications
You must be signed in to change notification settings - Fork 101
/
cliff.toml
67 lines (64 loc) · 2.33 KB
/
cliff.toml
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
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
[changelog]
header = """
# Terraform Provider ACI - Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
# TODO find a nicer way to remove the [something] tags from the start of commits.
body = """
{% if version %}\
## {{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%B %d, %Y") }})
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
{{ group | striptags | trim | upper_first }}:
{% for commit in commits -%}
- {{ commit.message | trim
| trim_start_matches(pat="[bugfix]")
| trim_start_matches(pat="[bug_fix]")
| trim_start_matches(pat="[bugfixes]")
| trim_start_matches(pat="[minor_change]")
| trim_start_matches(pat="[minor_changes]")
| trim_start_matches(pat="[major_change]")
| trim_start_matches(pat="[major_changes]")
| trim | capitalize }}
{% endfor -%}
{% endfor %}\n
"""
footer = """
"""
trim = true
postprocessors = [
{ pattern = '.*', replace_command = 'typos --write-changes -' }
]
[git]
conventional_commits = false
filter_unconventional = false
split_commits = false
commit_preprocessors = []
commit_parsers = [
{ message = "^.[I|i]gnore", skip = true },
{ message = "^Bump", skip = true }, # Ignore Dependabot version bumps
{ message = "^Merge.branch", skip = true }, # Ignore merge commits
{ message = "^.[M|m]ajor", group = "<!-- 0 -->BREAKING CHANGES" },
{ message = "[D|d]eprecat", group = "<!-- 1 -->DEPRECATIONS" },
{ message = "^.[M|m]inor", group = "<!-- 2 -->IMPROVEMENTS" },
{ message = "^.[B|b]ug", group = "<!-- 3 -->BUG FIXES" },
# Not skipped so version bumps are registered.
# However, not grouped so they don't show up in the changelog.
{ message = ".*[MAJOR|MINOR|PATCH].*version change" },
{ message = ".*", group = "<!-- 4 -->OTHER" },
]
protect_breaking_commits = false
filter_commits = true
topo_order = false
sort_commits = "oldest"
[bump]
features_always_bump_minor = true
breaking_always_bump_major = true
custom_major_increment_regex = "major"
custom_minor_increment_regex = "minor"