Skip to content

Commit

Permalink
feat(release-plz): added contributors to changelog (#24)
Browse files Browse the repository at this point in the history
The generated changelog should now include the author who made the
change.

Closes #22
  • Loading branch information
asasine authored Oct 19, 2024
1 parent 5cced2c commit 1bc67b2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/release-plz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[changelog]
body = """
## [{{ version | trim_start_matches(pat="v") }}]\
{%- if release_link -%}\
({{ release_link }})\
{% endif %} \
- {{ timestamp | date(format="%Y-%m-%d") }}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {%- if commit.scope %} *({{commit.scope}})* {%- endif -%} \
{%- if commit.breaking %} [**breaking**] {%- endif %} \
{{ commit.message -}} \
{{- self::username(commit=commit) }}
{% endfor -%}
{% endfor %}
{%- macro username(commit) -%}
{% if commit.remote.username %} by @{{ commit.remote.username }} {%- endif -%}
{%- endmacro %}
"""
2 changes: 2 additions & 0 deletions .github/workflows/release-plz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: MarcoIeni/[email protected]
with:
config: .github/release-plz.toml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit 1bc67b2

Please sign in to comment.