mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 22:35:40 +00:00
Merge pull request #1429 from CyberL1/fix/github-webhook-pr-body-empty
This commit is contained in:
@@ -168,7 +168,9 @@ const parseGitHubWebhook = (req: Request, res: Response, next: NextFunction) =>
|
||||
];
|
||||
|
||||
if (req.body.action === "opened") {
|
||||
discordPayload.embeds[0].description = req.body.pull_request.body.length > 500 ? `${req.body.pull_request.body.slice(0, 497)}...` : req.body.pull_request.body;
|
||||
if (req.body.pull_request.body != null) {
|
||||
discordPayload.embeds[0].description = req.body.pull_request.body.length > 500 ? `${req.body.pull_request.body.slice(0, 497)}...` : req.body.pull_request.body;
|
||||
}
|
||||
discordPayload.embeds[0].color = 38912;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user