From 846c2011662e916b0f3ed419b98002d73297e5d6 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Wed, 3 Dec 2025 22:31:10 +0100 Subject: [PATCH] fix: show only the first line of commit message --- src/api/routes/webhooks/#webhook_id/#token/github.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/routes/webhooks/#webhook_id/#token/github.ts b/src/api/routes/webhooks/#webhook_id/#token/github.ts index 68fe7c043..419b8d23a 100644 --- a/src/api/routes/webhooks/#webhook_id/#token/github.ts +++ b/src/api/routes/webhooks/#webhook_id/#token/github.ts @@ -246,7 +246,7 @@ const parseGitHubWebhook = (req: Request, res: Response, next: NextFunction) => .slice(0, 5) // Discord only shows 5 first commits .map( (c: { id: string; url: string; message: string; author: { username: string } }) => - `[\`${c.id.slice(0, 7)}\`](${c.url}) ${c.message.length > 46 ? `${c.message.slice(0, 47)}...` : c.message} - ${c.author.username}`, + `[\`${c.id.slice(0, 7)}\`](${c.url}) ${c.message.split("\n")[0].length > 46 ? `${c.message.slice(0, 47)}...` : c.message.split("\n")[0]} - ${c.author.username}`, ) .join("\n"), },