mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
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:
1 parent
aca870374f
commit
2911519f18
1 file changed
+4
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user