-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitcliff.toml
More file actions
52 lines (48 loc) · 1.64 KB
/
.gitcliff.toml
File metadata and controls
52 lines (48 loc) · 1.64 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
[git]
conventional = true
filter_unmerged = true
commit_preprocessors = [
{ pattern = "^Merge.+", replace = "" },
]
[changelog]
body = """
## Release {{ version }}
{% if date %}_{{ date }}_{% endif %}
{% if commits | length == 0 %}
No notable changes.
{% else %}
### Highlights
{% for group, commits in commits | group_by(attribute="type") %}
#### {{ group | default(value="other") | upper }}
{% for commit in commits %}
- {{ commit.message | split(pat="\n") | first }} ({{ commit.id | truncate(length=7) }})
{% if commit.body %} - {{ commit.body | indent(prefix=" ") }}{% endif %}
{% endfor %}
{% endfor %}
### Contributors
{% if commits | length == 0 %}
- No new contributors for this release.
{% else %}
{% for author_name, author_commits in commits | group_by(attribute="author.email") %}
{% set first_commit = author_commits | first %}
{% set display_name = first_commit.author.name | default(value=author_name | default(value="Unknown")) %}
{% set author_email = author_name | default(value="") | lower %}
{% set author_label = display_name | lower %}
{% set email_bot_parts = author_email | split(pat="bot") | length %}
{% set label_bot_parts = author_label | split(pat="bot") | length %}
{% set email_noreply_parts = author_email | split(pat="noreply") | length %}
{% set is_bot = email_bot_parts > 1 or label_bot_parts > 1 %}
{% set is_noreply = email_noreply_parts > 1 %}
{% if not is_bot and not is_noreply %}
- {{ display_name }} ({{ author_commits | length }} commit{% if author_commits | length > 1 %}s{% endif %})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
"""
group_by = ["type"]
trim = true
footer = """
---
Changelog generated by git-cliff.
"""