mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
fix(push): show commit links inline with messages
This commit is contained in:
parent
5834861a8d
commit
e01ce3505e
1 changed files with 2 additions and 3 deletions
|
|
@ -46,9 +46,8 @@ export function formatPush(
|
||||||
const commitField = (c: (typeof commits)[number]): { name: string; value: string } => {
|
const commitField = (c: (typeof commits)[number]): { name: string; value: string } => {
|
||||||
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 name =
|
const url = repo && c.id ? `https://github.com/${repo}/commit/${c.id}` : null;
|
||||||
repo && c.id ? `[${shortId}](https://github.com/${repo}/commit/${c.id})` : `\`${shortId}\``;
|
return { name: `\`${shortId}\``, value: url ? `[${shortId}](${url}) — ${msg}` : msg };
|
||||||
return { name, value: msg };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count <= 5) {
|
if (count <= 5) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue