Skip to content

Commit a09b8c7

Browse files
committed
release: tag contributor username in changelog
1 parent d5328d5 commit a09b8c7

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
env:
3939
OUTPUT: CHANGELOG.md
4040
GITHUB_REPO: ${{ github.repository }}
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4142

4243
- name: Commit package.json and CHANGELOG.md
4344
uses: ryancyq/github-signed-commit@v1

‎cliff.toml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ body = """
2626
| filter(attribute="scope")
2727
| sort(attribute="scope") %}
2828
- **({{commit.scope}})**{% if commit.breaking %} [**breaking**]{% endif %} \
29-
{{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }})) - {{ commit.author.name }}
29+
{{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }})) - {% if commit.remote.username %}@{{ commit.remote.username }}{% else %}{{ commit.author.name }}{% endif %}
3030
{%- endfor -%}
3131
{% raw %}\n{% endraw %}\
3232
{%- for commit in commits %}
3333
{%- if commit.scope -%}
3434
{% else -%}
3535
- {% if commit.breaking %} [**breaking**]{% endif %}\
36-
{{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }})) - {{ commit.author.name }}
36+
{{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }})) - {% if commit.remote.username %}@{{ commit.remote.username }}{% else %}{{ commit.author.name }}{% endif %}
3737
{% endif -%}
3838
{% endfor -%}
3939
{% endfor %}\n
@@ -49,6 +49,10 @@ postprocessors = [
4949
{ pattern = '<REPO>', replace = "https://github.com/ryancyq/github-signed-commit" }, # replace repository URL
5050
]
5151

52+
[remote.github]
53+
owner = "ryancyq"
54+
repo = "github-signed-commit"
55+
5256
[git]
5357
# parse the commits based on https://www.conventionalcommits.org
5458
conventional_commits = true

0 commit comments

Comments
 (0)