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.
This commit is contained in:
翅膀 committed 2026-10-23 23:21:54 +08:00
1 parent aca870374f
commit 2911519f18
1 file changed
+4 -1
+4 -1
View File
@@ -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;