From 270dfd685da8ae2852fa6f451b588f21888aaf90 Mon Sep 17 00:00:00 2001 From: shimon Date: Fri, 24 Jan 2025 16:39:16 +0200 Subject: [PATCH] payload debug --- app/controllers/api/vcs.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 8971d4549d..bf6bc19ec4 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -887,6 +887,7 @@ App::post('/v1/vcs/github/events') function (GitHub $github, Request $request, Response $response, Database $dbForPlatform, callable $getProjectDB, Build $queueForBuilds) use ($createGitDeployments) { $payload = $request->getRawPayload(); + $event = $request->getHeader('x-github-event', ''); $parsedPayload = $github->getEvent($event, $payload); $providerInstallationId = $parsedPayload["installationId"] ?? ''; @@ -936,7 +937,7 @@ App::post('/v1/vcs/github/events') throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN, "Invalid webhook payload signature. Please make sure the webhook secret has same value in your GitHub app and in the _APP_VCS_GITHUB_WEBHOOK_SECRET environment variable"); } - $event = $request->getHeader('x-github-event', ''); + $privateKey = System::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY'); $githubAppId = System::getEnv('_APP_VCS_GITHUB_APP_ID');