-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcliff.toml
53 lines (51 loc) · 1.82 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
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
[changelog]
# template for the changelog header
header = """
# 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
body = """
{% if version %}\
## {{ version | trim_start_matches(pat="v") }}
{% else %}\
## Unreleased
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group }}\
{% for scope, commits in commits | group_by(attribute="scope") %}
{% if scope %}\
#### {{ scope }}
{% endif %}\
{% for commit in commits %}
{% if scope %}\
- {{ commit.message | replace(from=commit.group ~ "(" ~ commit.scope ~ ")" ~": ", to="") }}
{% else %}\
- {{ commit.message | replace(from=commit.group ~ ": ", to="") }}
{% endif %}\
{% endfor %}\
{% endfor %}\
{% endfor %}\n
"""
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = false
commit_parsers = [
{ message = "^([^(:]+)(?:\\(([^)]+)\\))?:\\s*", group = "${1}", scope = "${2}" },
{ message = "^[^:]+$", group = "Other", scope = "" },
] # regex for parsing and grouping commitssplit_commits = false# process each line of a commit as an individual commitfilter_unconventional = false# filter out the commits that are not conventional
# filter out the commits that are not matched by commit parsers
filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "newest"