-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease-notes-template
35 lines (29 loc) · 1.3 KB
/
release-notes-template
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
{% if version.tag -%}
## [{{ version.tag }}]({{repository_url}}/releases/tag/{{ version.tag }})
{% else -%}
{% set from = commits | last -%}
{% set to = version.id-%}
{% set from_shorthand = from.id | truncate(length=7, end="") -%}
{% set to_shorthand = to | truncate(length=7, end="") -%}
## Unreleased ({{ from_shorthand ~ ".." ~ to_shorthand }})
{% endif -%}
{% for type, typed_commits in commits | sort(attribute="type")| group_by(attribute="type")-%}
#### {{ type | upper_first }}
{% for scope, scoped_commits in typed_commits | group_by(attribute="scope") -%}
{% for commit in scoped_commits | sort(attribute="scope") -%}
{% set shorthand = commit.id | truncate(length=7, end="") -%}
- **({{ scope }})** {{ commit.summary }} - ([{{ shorthand }}]({{ repository_url }}/commit/{{ commit.id }}))
{{ commit.body }}
{% endfor -%}
{% endfor -%}
{%- for commit in typed_commits | unscoped -%}
{% if commit.author -%}
{% set author = commit.author -%}
{% else -%}
{% set author = commit.signature -%}
{% endif -%}
{% set shorthand = commit.id | truncate(length=7, end="") -%}
- {{ commit.summary }} - ([{{ shorthand }}]({{ repository_url }}/commit/{{ commit.id }}))
{{ commit.body }}
{% endfor -%}
{% endfor -%}