summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorCyber <cyber.hf18@gmail.com>2025-12-03 22:32:07 +0100
committerGitHub <noreply@github.com>2025-12-03 22:32:07 +0100
commite981f491b7f0118ffcc5a5200e8f51cc928f2664 (patch)
tree5d44778cfdb80470d508f8d36fe63be9d58b67df /src/api
parentAlways use req.ip when calling getIpAddress (diff)
parentfix: show only the first line of commit message (diff)
downloadserver-ts-e981f491b7f0118ffcc5a5200e8f51cc928f2664.tar.xz
Merge pull request #1422 from CyberL1/fix/github-embed-push-show-only-the-first-line
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/webhooks/#webhook_id/#token/github.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/webhooks/#webhook_id/#token/github.ts b/src/api/routes/webhooks/#webhook_id/#token/github.ts

index 68fe7c04..419b8d23 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"), },