Skip to content

Commit 6f00d0b

Browse files
author
matmoncon
committed
chore: add CHANGELOG template
1 parent 61d27cf commit 6f00d0b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

templates/CHANGELOG.md.j2

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# CHANGELOG
2+
{% if context.history.unreleased | length > 0 %}
3+
4+
{# UNRELEASED #}
5+
## Unreleased
6+
{% for type_, commits in context.history.unreleased | dictsort %}
7+
{% if type_ in ["feature", "fix", "performance", "documentation", "refactor"] %}
8+
### {{ type_ | capitalize }}
9+
{% for commit in commits %}{% if type_ in ["feature", "fix", "performance", "documentation", "refactor"] %}
10+
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
11+
{% endif %}{% endfor %}{% endif %}{% endfor %}
12+
13+
{% endif %}
14+
15+
{# RELEASED #}
16+
{% for version, release in context.history.released.items() %}
17+
## What's Changed in {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }})
18+
{% for type_, commits in release["elements"] | dictsort %}
19+
{% if type_ in ["feature", "fix", "performance", "documentation", "refactor"] %}
20+
### {{ type_ | capitalize }}
21+
{% for commit in commits %}
22+
{% if type_ in ["feature", "fix", "performance", "documentation", "refactor"] %}
23+
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
24+
{% endif %}{% endfor %}{% endif %}{% endfor %}{% endfor %}

0 commit comments

Comments
 (0)