forked from cosmos/ibc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cliff.toml
119 lines (109 loc) · 4.9 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
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
# configuration file for git-cliff (0.1.0)
[changelog]
# changelog header
header = """
<!--
Usage:
Change log entries are generated by git cliff ref: https://github.com/orhun/git-cliff
This can be run using "make changelog tag=vx.y.z"
Each commit should be conventional, the following message groups are supported.
* feat, feature
* imp
* bug, fix
* deprecated
* (api)!
* (statemachine)!
Types of changes (Stanzas):
"Features" for new features. (feat, feature)
"Improvements" for changes in existing functionality. (imp)
"Deprecated" for soon-to-be removed features.
"Bug Fixes" for any bug fixes. (bug, fix)
"API Breaking" for breaking exported APIs used by developers building on SDK. Add (api)! e.g. fix(api)!: api breaking fix
"State Machine Breaking" for any changes that result in a different AppState given the same genesisState and txList. Add (statemachine)! e.g. fix(statemachine)!: state machine breaking fix
Ref: https://keepachangelog.com/en/1.0.0/
-->
# Changelog
All notable changes to this project will be documented in this file.
"""
# template for the changelog body
# https://tera.netlify.app/docs/#introduction
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 %}
* {{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
footer = """
<!-- generated by git-cliff -->
"""
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = true
# regex for preprocessing the commit messages
commit_preprocessors = [
# A reference to an issue is appended to commits that looks like "(#1234)", this will be replaced
# with a link to that issue, e.g. "[#$1234](https://github.com/cosmos/ibc-go/issues/1234)".
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/cosmos/ibc-go/issues/${2}))" },
# any reference to a pr like "pr-1234" will be replaced with a link to the PR.
{ pattern = '\(pr-([0-9]+)\)', replace = "([#${1}](https://github.com/cosmos/ibc-go/pulls/${1}))" },
# the following patterns only exist because "split_commits" is set to true, and we are processesing
# each line of the commit as a separate message.
# these exist to filter out common messages that appear in commit messages that are technically
# conventional, but we do not way to include in the changelog.
{ pattern = '^Signed-off-by:.*', replace='' },
{ pattern = '^Co-authored-by:.*', replace='' },
# don't include references to issues as changelog entries.
{ pattern = '^ref:.*', replace='' },
# exclude CVSS format, CVE can still be included in regular conventinal commits.
{ pattern = 'CVSS:.*', replace='' },
# don't include dependabot auto merge entries.
{ pattern = '.*dependabot-automerge-.*', replace='' },
# don't include statements saying which issue is closed.
{ pattern = '^closes:.*', replace='' },
# remove standalone links in the commit messages.
{ pattern = '^https://.*', replace='' },
# remove lines with html.
{ pattern = '^<.*', replace='' },
]
# regex for parsing and grouping commits
commit_parsers = [
# specifying the number in a comment is a workaround to enable ordering of groups.
# these comments are stripped out of the markdown with the filter "{{ group | striptags | trim | upper_first }}"
# above in the body template.
{ message = "^((?i)deps|(?i)dep|(?i)build)", group = "<!-- 0 -->Dependencies" },
{ message = '^.*\(api\)!', group = "<!-- 1 -->API Breaking" },
{ message = '^.*\(statemachine\)!', group = "<!-- 2 -->State Machine Breaking" },
{ message = "^((?i)improvements|(?i)imp)", group = "<!-- 3 -->Improvements" },
{ message = "^((?i)feature|(?i)feat)", group = "<!-- 4 -->Features" },
{ message = "^((?i)fix|(?i)bug)", group = "<!-- 5 -->Bug Fixes" },
{ message = "^((?i)doc|(?i)docs|(?i)documentation)", group = "<!-- 6 -->Documentation" },
{ message = "^((?i)test|(?i)e2e)", group = "<!-- 7 -->Testing" },
{ message = "^((?i)deprecated)", group = "<!-- 8 -->Deprecated" },
{ message = "^((?i)chore|(?i)misc|(?i)nit)", group = "<!-- 9 -->Miscellaneous Tasks" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# regex for skipping tags
skip_tags = ""
# regex for ignoring tags
ignore_tags = ""
# sort the tags chronologically
date_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"