From 1febc3fd724411bcbf36d1223e05d373760daa52 Mon Sep 17 00:00:00 2001 From: tienbh Date: Fri, 20 Nov 2026 14:27:27 +0700 Subject: [PATCH] refactor: Update cliff.toml to display contributors using Gitea usernames instead of author names for improved clarity --- cliff.toml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cliff.toml b/cliff.toml index 66ae8d0..adf90d2 100644 --- a/cliff.toml +++ b/cliff.toml @@ -25,11 +25,18 @@ body = """ - {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end="") }}) {%- endfor %} {% endfor %} -{%- set authors = commits | map(attribute="author.name") | unique | sort %} -{% if authors | length > 0 %} +{#- Author names vary per machine (tienbh / Tien-BH / ...); the email local part matches the Gitea username. -#} +{%- 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 -{% for author in authors %} -* {{ author }} +{% for username in usernames | sort %} +* @{{ username }} {%- endfor %} {% endif %} {% if server and repository and version %}