Skip to content

Commit

Permalink
ci: update changelog parameters (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
julesbertrand committed Oct 16, 2023
1 parent 7ea8975 commit 5cd8321
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ commit_message = "chore(release): {version}\n\nAutomatically generated by semant
tag_format = "{version}"

[tool.semantic_release.changelog]
exclude_commit_patterns = ["chore(release)", "Merge pull request"]
exclude_commit_patterns = ['''^chore\(release\).*''']
21 changes: 21 additions & 0 deletions templates/CHANGELOG.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# CHANGELOG
{% if context.history.unreleased | length > 0 %}
{# UNRELEASED #}
## Unreleased
{% for type_, commits in context.history.unreleased | dictsort %}
### {{ type_ | capitalize }}
{% for commit in commits %}{% if type_ != "unknown" %}
* {{ commit.message.rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
{% else %}
* {{ commit.message.rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
{% endif %}{% endfor %}{% endfor %}{% endif %}
{% for version, release in context.history.released.items() %}
{# RELEASED #}
## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }})
{% for type_, commits in release["elements"] | dictsort %}
### {{ type_ | capitalize }}
{% for commit in commits %}{% if type_ != "unknown" %}
* {{ commit.message.rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
{% else %}
* {{ commit.message.rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
{% endif %}{% endfor %}{% endfor %}{% endfor %}

0 comments on commit 5cd8321

Please sign in to comment.