refactor: Update cliff.toml to display contributors using Gitea usernames instead of author names for improved clarity
gitea/global-workflow: Release / Release (push) Successful in 6s
gitea/global-workflow: Release / Release (push) Successful in 6s
This commit is contained in:
1 parent
909a97bc5a
commit
1febc3fd72
1 file changed
+11
-4
+11
-4
@@ -25,11 +25,18 @@ body = """
|
|||||||
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end="") }})
|
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end="") }})
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{%- set authors = commits | map(attribute="author.name") | unique | sort %}
|
{#- Author names vary per machine (tienbh / Tien-BH / ...); the email local part matches the Gitea username. -#}
|
||||||
{% if authors | length > 0 %}
|
{%- set_global usernames = [] %}
|
||||||
|
{%- for commit in commits %}
|
||||||
|
{%- set username = commit.author.email | split(pat="@") | first | lower %}
|
||||||
|
{%- if username and username is not containing("bot") and username != "github-actions" and not username in usernames %}
|
||||||
|
{%- set_global usernames = usernames | concat(with=username) %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{% if usernames | length > 0 %}
|
||||||
## Contributors
|
## Contributors
|
||||||
{% for author in authors %}
|
{% for username in usernames | sort %}
|
||||||
* {{ author }}
|
* @{{ username }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if server and repository and version %}
|
{% if server and repository and version %}
|
||||||
|
|||||||
Reference in new issue
Block a user