Skip to content

Commit

Permalink
chore: template update
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicconike committed Jun 28, 2024
1 parent 666332e commit 2370d9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- '.github/workflows/release.yml'
- '**/*.py'
- 'pyproject.toml'
- 'CHANGELOG.md.j2'
- 'Dockerfile'
pull_request:
branches: [ "master" ]
Expand Down
2 changes: 2 additions & 0 deletions templates/CHANGELOG.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [{{ context.version }}] - {% if context.tag_date %}{{ context.tag_date.strftime("%Y-%m-%d") }}{% else %}Unreleased{% endif %}

{% set commit_count = 0 %}
{% if context.history.released is defined and context.history.released[context.version] is defined and context.history.released[context.version]["elements"] is defined %}
{% for type_, commits in context.history.released[context.version]["elements"] | dictsort %}
### {{ type_ | capitalize }}
{% for commit in commits if commit.commit.parents | length == 1 %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% set commit_count = commit_count + 1 %}
{% endfor %}
{% endfor %}
{% endif %}

{% if commit_count > 5 %}
*... and more. [See the full Changelog](https://github.com/{{ context.repo_owner }}/{{ context.repo_name }}/releases/tag/{{ context.version }})
Expand Down

0 comments on commit 2370d9b

Please sign in to comment.