@@ -19,25 +19,48 @@ body = """
19
19
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
20
20
{%- endmacro -%}
21
21
22
+ {% macro print_commit(commit) -%}
23
+ - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
24
+ {% if commit.breaking %}[**breaking**] {% endif %}\
25
+ {{ commit.message | upper_first }} - \
26
+ ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
27
+ {% endmacro -%}
28
+
22
29
{% if version %}\
23
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
30
+ {% if previous.version %}\
31
+ ## [{{ version | trim_start_matches(pat="v") }}]\
32
+ ({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
33
+ {% else %}\
34
+ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
35
+ {% endif %}\
24
36
{% else %}\
25
37
## [unreleased]
26
38
{% endif %}\
27
- {% if previous %}\
28
- {% if previous.version %}
29
- **Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
30
- {% endif %}
31
- {% endif %}\
39
+
32
40
{% for group, commits in commits | group_by(attribute="group") %}
33
- ### {{ group | upper_first }}
41
+ ### {{ group | striptags | trim | upper_first }}
42
+ {% for commit in commits
43
+ | filter(attribute="scope")
44
+ | sort(attribute="scope") %}
45
+ {{ self::print_commit(commit=commit) }}
46
+ {%- endfor %}
34
47
{% for commit in commits %}
35
- - {% if commit.github.pr_number %}#{{ commit.github.pr_number }} {%- endif %}\
36
- {% if commit.breaking %}[**💥 breaking 💥**] {% endif %}\
37
- {{ commit.message | upper_first }}\
38
- {% if commit.github.username %} (thanks @{{ commit.github.username }}){%- endif %}\
39
- {% endfor %}
40
- {% endfor %}\n
48
+ {%- if not commit.scope -%}
49
+ {{ self::print_commit(commit=commit) }}
50
+ {% endif -%}
51
+ {% endfor -%}
52
+ {% endfor -%}
53
+ {%- if github -%}
54
+ {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
55
+ ## New Contributors ❤️
56
+ {% endif %}\
57
+ {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
58
+ * @{{ contributor.username }} made their first contribution
59
+ {%- if contributor.pr_number %} in \
60
+ [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
61
+ {%- endif %}
62
+ {%- endfor -%}
63
+ {%- endif %}
41
64
"""
42
65
# template for the changelog footer
43
66
footer = """
@@ -70,6 +93,7 @@ commit_parsers = [
70
93
{ message = " ^chore\\ (deps.*\\ )" , skip = true },
71
94
{ message = " ^chore\\ (pr\\ )" , skip = true },
72
95
{ message = " ^chore\\ (pull\\ )" , skip = true },
96
+ { message = " ^chore\\ (git-sync\\ )" , skip = true },
73
97
{ message = " ^chore|^ci" , group = " <!-- 7 -->⚙️ Miscellaneous Tasks" },
74
98
{ body = " .*security" , group = " <!-- 8 -->🛡️ Security" },
75
99
{ message = " ^revert" , group = " <!-- 9 -->◀️ Revert" },
@@ -79,14 +103,12 @@ protect_breaking_commits = false
79
103
# filter out the commits that are not matched by commit parsers
80
104
filter_commits = false
81
105
# regex for matching git tags
82
- # tag_pattern = "v[0-9].*"
106
+ tag_pattern = " v[0-9].*"
83
107
# regex for skipping tags
84
- # skip_tags = ""
108
+ skip_tags = " beta|alpha "
85
109
# regex for ignoring tags
86
- # ignore_tags = ""
110
+ ignore_tags = " rc "
87
111
# sort the tags topologically
88
112
topo_order = false
89
113
# sort the commits inside sections by oldest/newest order
90
- sort_commits = " oldest"
91
- # limit the number of commits included in the changelog.
92
- # limit_commits = 42
114
+ sort_commits = " newest"
0 commit comments