Skip to content

Commit 102b6f3

Browse files
committed
chore: update release-plz.toml
1 parent 1cdc65e commit 102b6f3

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

release-plz.toml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,53 @@ body = """
2828
2929
{%- macro print_commit(commit) -%}
3030
31-
- {% if commit.remote.pr_number -%}\
32-
[`#{{ commit.remote.pr_number }}`]({{ remote.link }}/pull/{{ commit.remote.pr_number }})\
33-
{%- endif %} \
34-
{% if commit.breaking %}**\\[BREAKING\\]** {% endif %}\
31+
- {{ self::mention_pr(commit=commit) }} \
32+
{% if commit.breaking %}**\\[BREAKING\\]** {% endif %} \
3533
{{ commit.message }} \
36-
[`{{ commit.id | truncate(length=7, end="") }}`]({{ remote.link }}/commit/{{ commit.id }})\
37-
{%- raw %}\n\n{% endraw -%}
34+
[`{{ commit.id | truncate(length=7, end="") }}`]({{ remote.link }}/commit/{{ commit.id }}) \
35+
{{ self::mention_username(commit=commit) }}
3836
3937
{%- endmacro -%}
4038
41-
{%- if version -%}
39+
{%- macro mention_pr(commit) -%}
40+
41+
{% if commit.remote.pr_number %} \
42+
[#{{ commit.remote.pr_number }}]({{ remote.link }}/pull/{{ commit.remote.pr_number }}) \
43+
{% endif %}
44+
45+
{%- endmacro -%}
46+
47+
{%- macro mention_username(commit) -%}
48+
49+
{% if commit.remote.username %} \
50+
(by @{{ commit.remote.username }}) \
51+
{% endif %}
52+
53+
{%- endmacro -%}
54+
55+
{% if version %}
56+
4257
## {{ version | trim_start_matches(pat="v") }}
4358
44-
{%- if previous.version -%}
45-
{%- raw %}\n\n{% endraw -%}
59+
{% if previous.version %}
4660
[v{{ previous.version }}..v{{ version }}]({{ release_link }})
47-
{%- endif -%}
61+
{% endif %}
4862
49-
{%- raw %}\n\n{% endraw -%}
50-
{%- endif -%}
63+
{% endif %}
5164
52-
{%- raw %}\n\n{% endraw -%}
65+
{% for group, commits in commits | group_by(attribute="group") %}
5366
54-
{%- for group, commits in commits | group_by(attribute="group") -%}
55-
### {{ group }} {%- raw %}\n\n{% endraw -%}
67+
### {{ group }}
5668
57-
{%- for commit in commits
69+
{% for commit in commits
5870
| filter(attribute="merge_commit", value=false)
59-
| unique(attribute="message") -%}
60-
{{- self::print_commit(commit=commit) -}}
61-
{%- endfor -%}
71+
| unique(attribute="message") %}
72+
73+
{{ self::print_commit(commit=commit) }}
74+
75+
{% endfor %}
6276
63-
{%- endfor -%}
77+
{% endfor %}
6478
"""
6579

6680
link_parsers = [{ pattern = "#(\\d+)", href = "{{ remote.link }}/issues/$1" }]

0 commit comments

Comments
 (0)