Skip to content

Commit

Permalink
📝 clean up release_notes and CHANGELOG templates
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Jun 18, 2024
1 parent 64ddc38 commit 2b9eaaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/.release_notes.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
{% include 'parsed_commit_heading.j2' %}
{%- if type_ != "unknown" %}
{% for commit in commits %}
* {{ commit.descriptions[0] }} by {{commit.commit.author.name}} in [`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }})
* {{ commit.descriptions[0]|replace(type_~': ','')|replace(type_,'') }} by {{commit.commit.author.name}} in [`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }})
{%- endfor %}{% endif %}{% endfor %}
9 changes: 5 additions & 4 deletions templates/CHANGELOG.md.j2
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# CHANGELOG

{%- if context.history.unreleased | length > 0 %}

{#- UNRELEASED -#}
## Unreleased
{% for type_, commits in context.history.unreleased | dictsort %}
{% for commit in commits %}{% if type_ != "unknown" %}
{% include 'parsed_commit_heading.j2' %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
* {{ commit.commit.message.rstrip()|replace(type_~': ','')|replace(type_,'') }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% else %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
* {{ commit.commit.message.rstrip()|replace(type_~': ','')|replace(type_,'') }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endif %}{% endfor %}{% endfor %}
{% endif -%}

Expand All @@ -18,7 +19,7 @@
{% for type_, commits in release["elements"] | dictsort %}
{% include 'parsed_commit_heading.j2' %}
{% for commit in commits %}{% if type_ != "unknown" %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
* {{ commit.commit.message.rstrip()|replace(type_~': ','')|replace(type_,'') }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% else %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
* {{ commit.commit.message.rstrip()|replace(type_~': ','')|replace(type_,'') }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endif %}{% endfor %}{% endfor %}{% endfor %}

0 comments on commit 2b9eaaf

Please sign in to comment.