Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: no webhook secret found?

Andras Bacsaiabe92dedff2b
diff --git a/src/routes/webhooks/github/events.ts b/src/routes/webhooks/github/events.ts
index b50c199295..21eead6c2a 100644
--- a/src/routes/webhooks/github/events.ts
+++ b/src/routes/webhooks/github/events.ts
@@ -47,7 +47,7 @@ export const post: RequestHandler = async (event) => {
const applicationFound = await db.getApplicationWebhook({ projectId, branch });
if (applicationFound) {
- const webhookSecret = applicationFound.gitSource.githubApp.webhookSecret;
+ const webhookSecret = applicationFound.gitSource.githubApp.webhookSecret || null;
const hmac = crypto.createHmac('sha256', webhookSecret);
const digest = Buffer.from(
'sha256=' + hmac.update(JSON.stringify(body)).digest('hex'),