mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
fix(push): use commit message as link text
This commit is contained in:
1 file changed
+1
-1
@@ -47,7 +47,7 @@ export function formatPush(
|
|||||||
const shortId = c.id?.slice(0, 7) ?? "???????";
|
const shortId = c.id?.slice(0, 7) ?? "???????";
|
||||||
const msg = c.message?.split("\n")[0].slice(0, 72) ?? t("common.no_message");
|
const msg = c.message?.split("\n")[0].slice(0, 72) ?? t("common.no_message");
|
||||||
const url = repo && c.id ? `https://github.com/${repo}/commit/${c.id}` : null;
|
const url = repo && c.id ? `https://github.com/${repo}/commit/${c.id}` : null;
|
||||||
return { name: `\`${shortId}\``, value: url ? `[${shortId}](${url}) — ${msg}` : msg };
|
return { name: `\`${shortId}\``, value: url ? `[${msg}](${url})` : msg };
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count <= 5) {
|
if (count <= 5) {
|
||||||
|
|||||||
Reference in new issue
Block a user