Skip to content

Commit

Permalink
patch: Add release notes template
Browse files Browse the repository at this point in the history
* Create a template to govern the generation of release notes by
  python-semantic-release.
* Bump the patch version number to test that this works as expected.
  • Loading branch information
jmgate committed Oct 24, 2023
1 parent 9972341 commit a447eac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/.release_notes.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% for type_, commits in release["elements"] | dictsort %}
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration" }}
{%- if type_ != "unknown" %}
{% for commit in commits -%}
{%- set summary = commit.message.rstrip().splitlines()[0] -%}
{%- set details = commit.message.rstrip().splitlines()[2:] -%}
* {{ summary }} ([`{{ commit.hexsha[:7] }}`]({{ commit.hexsha | commit_hash_url }}))
{% if details %}
{% for line in details %}{% if line.strip() %} {{ line }}{% endif %}
{% endfor %}{% endif -%}
{% endfor %}{% endif %}{% endfor %}

0 comments on commit a447eac

Please sign in to comment.