mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +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,
|
type T,
|
||||||
buildMessage,
|
buildMessage,
|
||||||
repoBaseUrl,
|
repoBaseUrl,
|
||||||
|
senderProfileUrl,
|
||||||
shortRef,
|
shortRef,
|
||||||
} from "./helpers";
|
} from "./helpers";
|
||||||
|
|
||||||
@@ -107,7 +108,9 @@ export function formatPush(
|
|||||||
if (commitAuthor === "invalid-email-address") {
|
if (commitAuthor === "invalid-email-address") {
|
||||||
if (commitAuthorName) msg += ` - ${commitAuthorName}`;
|
if (commitAuthorName) msg += ` - ${commitAuthorName}`;
|
||||||
} else {
|
} 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;
|
const url = baseUrl && c.id ? `${baseUrl}/commit/${c.id}` : null;
|
||||||
|
|||||||
Reference in new issue
Block a user