mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
fix(push): link commit hash and render message as plain text
This commit is contained in:
parent
e1b1daac98
commit
52d136c468
7 changed files with 1249 additions and 1175 deletions
|
|
@ -47,7 +47,8 @@ export function formatPush(
|
|||
const shortId = c.id?.slice(0, 7) ?? "???????";
|
||||
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;
|
||||
return { name: `\`${shortId}\``, value: url ? `[${msg}](${url})` : msg };
|
||||
const hash = url ? `[\`${shortId}\`](${url})` : `\`${shortId}\``;
|
||||
return { name: `\u200b`, value: `${hash} ${msg}` };
|
||||
};
|
||||
|
||||
if (count <= 5) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue