From b6d8851c995f1e2665b24e35dbca501e3b8b75a9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 6 Nov 2023 10:22:46 +0100 Subject: [PATCH] fix: no id found --- routes/webhooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/webhooks.php b/routes/webhooks.php index 809cffe86..c38c62ae1 100644 --- a/routes/webhooks.php +++ b/routes/webhooks.php @@ -65,6 +65,7 @@ Route::get('/source/github/install', function () { }); Route::post('/source/github/events', function () { try { + $id = null; $x_github_delivery = request()->header('X-GitHub-Delivery'); $x_github_event = Str::lower(request()->header('X-GitHub-Event')); $x_github_hook_installation_target_id = request()->header('X-GitHub-Hook-Installation-Target-Id'); @@ -88,7 +89,6 @@ Route::post('/source/github/events', function () { return response('not cool'); } } - if ($x_github_event === 'push') { $id = data_get($payload, 'repository.id'); $branch = data_get($payload, 'ref');