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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Update webhooks configuration and application search.
Andras Bacsai0590ed7b2e1b
diff --git a/resources/views/livewire/project/shared/webhooks.blade.php b/resources/views/livewire/project/shared/webhooks.blade.phpindex b47aba0978..243b5dea33 100644--- a/resources/views/livewire/project/shared/webhooks.blade.php+++ b/resources/views/livewire/project/shared/webhooks.blade.php@@ -12,13 +12,19 @@<div><h3>Manual Git Webhooks</h3><form wire:submit.prevent='saveSecret' class="flex flex-col gap-2">- <div class="flex gap-2">+ <div class="flex items-end gap-2"><x-forms.input helper="Content Type in GitHub configuration could be json or form-urlencoded." readonlylabel="GitHub" id="githubManualWebhook"></x-forms.input><x-forms.input type="password"helper="Need to set a secret to be able to use this webhook. It should match with the secret in GitHub."label="GitHub Webhook Secret" id="resource.manual_webhook_secret_github"></x-forms.input>+</div>+ <a target="_blank" class="flex hover:no-underline" href="{{ $resource?->gitWebhook }}">+ <x-forms.button>Webhook Configuration on GitHub+ <x-external-link />+ </x-forms.button>+ </a><div class="flex gap-2"><x-forms.input readonly label="GitLab" id="gitlabManualWebhook"></x-forms.input><x-forms.input type="password"diff --git a/routes/webhooks.php b/routes/webhooks.phpindex 8ca16dd8c2..a2dbf5a1a8 100644--- a/routes/webhooks.php+++ b/routes/webhooks.php@@ -94,7 +94,7 @@ Route::post('/source/gitlab/events/manual', function () {}ray('Webhook GitHub Pull Request Event with branch: ' . $branch . ' and base branch: ' . $base_branch . ' and pull request id: ' . $pull_request_id);}- $applications = Application::whereNotNull('private_key_id')->where('git_repository', 'like', "%$full_name%");+ $applications = Application::where('git_repository', 'like', "%$full_name%");if ($x_gitlab_event === 'push') {$applications = $applications->where('git_branch', $branch)->get();if ($applications->isEmpty()) {@@ -192,7 +192,6 @@ Route::post('/source/github/events/manual', function () {if ($content_type !== 'application/json') {$payload = json_decode(data_get($payload, 'payload'), true);}- ray($payload);if ($x_github_event === 'push') {$branch = data_get($payload, 'ref');$full_name = data_get($payload, 'repository.full_name');@@ -213,8 +212,7 @@ Route::post('/source/github/events/manual', function () {if (!$branch) {return response('Nothing to do. No branch found in the request.');}- $applications = Application::whereNotNull('private_key_id')->where('git_repository', 'like', "%$full_name%");-+ $applications = Application::where('git_repository', 'like', "%$full_name%");if ($x_github_event === 'push') {$applications = $applications->where('git_branch', $branch)->get();if ($applications->isEmpty()) {@@ -227,6 +225,7 @@ Route::post('/source/github/events/manual', function () {return response("Nothing to do. No applications found with branch '$base_branch'.");}}+ ray($applications);foreach ($applications as $application) {ray($application);$webhook_secret = data_get($application, 'manual_webhook_secret_github');