From 2911519f18df7ef8755b5597bf86cf4a900ef7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=85=E8=86=80?= Date: Fri, 23 Oct 2026 23:21:54 +0800 Subject: [PATCH] fix(gitea): link push authors to their forge A Gitea author is not the same-named GitHub account. Build author profile links from the originating forge. --- server/lib/formatters/push.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/lib/formatters/push.ts b/server/lib/formatters/push.ts index 329c7d5..26aa291 100644 --- a/server/lib/formatters/push.ts +++ b/server/lib/formatters/push.ts @@ -9,6 +9,7 @@ import { type T, buildMessage, repoBaseUrl, + senderProfileUrl, shortRef, } from "./helpers"; @@ -107,7 +108,9 @@ export function formatPush( if (commitAuthor === "invalid-email-address") { if (commitAuthorName) msg += ` - ${commitAuthorName}`; } else { - msg += ` - [${commitAuthor}](https://github.com/${encodeURIComponent(commitAuthor)})`; + // On the forge the push came from (a Gitea author is not the + // GitHub account of the same name). + msg += ` - [${commitAuthor}](${senderProfileUrl(baseUrl ?? undefined, commitAuthor)})`; } } const url = baseUrl && c.id ? `${baseUrl}/commit/${c.id}` : null;