Merge pull request #1422 from CyberL1/fix/github-embed-push-show-only-the-first-line

This commit is contained in:
Cyber
2025-12-03 22:32:07 +01:00
committed by GitHub
@@ -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"),
},