From 54a834e04288fc792c3856b52795974e2fe1cb22 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:15:16 +0100 Subject: [PATCH] fix(git): trigger deployments when watch_paths is empty --- app/Http/Controllers/Webhook/Gitea.php | 2 +- app/Http/Controllers/Webhook/Github.php | 4 ++-- app/Http/Controllers/Webhook/Gitlab.php | 2 +- app/Jobs/ProcessGithubPullRequestWebhook.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Webhook/Gitea.php b/app/Http/Controllers/Webhook/Gitea.php index b46db0b59..a9d65eae6 100644 --- a/app/Http/Controllers/Webhook/Gitea.php +++ b/app/Http/Controllers/Webhook/Gitea.php @@ -90,7 +90,7 @@ public function manual(Request $request) if ($x_gitea_event === 'push') { if ($application->isDeployable()) { $is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files); - if ($is_watch_path_triggered || is_null($application->watch_paths)) { + if ($is_watch_path_triggered || blank($application->watch_paths)) { $deployment_uuid = new Cuid2; $result = queue_application_deployment( application: $application, diff --git a/app/Http/Controllers/Webhook/Github.php b/app/Http/Controllers/Webhook/Github.php index 8c912731f..e5a5b746e 100644 --- a/app/Http/Controllers/Webhook/Github.php +++ b/app/Http/Controllers/Webhook/Github.php @@ -101,7 +101,7 @@ public function manual(Request $request) if ($x_github_event === 'push') { if ($application->isDeployable()) { $is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files); - if ($is_watch_path_triggered || is_null($application->watch_paths)) { + if ($is_watch_path_triggered || blank($application->watch_paths)) { $deployment_uuid = new Cuid2; $result = queue_application_deployment( application: $application, @@ -284,7 +284,7 @@ public function normal(Request $request) if ($x_github_event === 'push') { if ($application->isDeployable()) { $is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files); - if ($is_watch_path_triggered || is_null($application->watch_paths)) { + if ($is_watch_path_triggered || blank($application->watch_paths)) { $deployment_uuid = new Cuid2; $result = queue_application_deployment( application: $application, diff --git a/app/Http/Controllers/Webhook/Gitlab.php b/app/Http/Controllers/Webhook/Gitlab.php index 34a5266ca..08e5d7162 100644 --- a/app/Http/Controllers/Webhook/Gitlab.php +++ b/app/Http/Controllers/Webhook/Gitlab.php @@ -122,7 +122,7 @@ public function manual(Request $request) if ($x_gitlab_event === 'push') { if ($application->isDeployable()) { $is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files); - if ($is_watch_path_triggered || is_null($application->watch_paths)) { + if ($is_watch_path_triggered || blank($application->watch_paths)) { $deployment_uuid = new Cuid2; $result = queue_application_deployment( application: $application, diff --git a/app/Jobs/ProcessGithubPullRequestWebhook.php b/app/Jobs/ProcessGithubPullRequestWebhook.php index 6c2f8e75c..041cd812c 100644 --- a/app/Jobs/ProcessGithubPullRequestWebhook.php +++ b/app/Jobs/ProcessGithubPullRequestWebhook.php @@ -107,7 +107,7 @@ private function handleOpenAction(Application $application, ?GithubApp $githubAp // Apply watch path filtering $is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files); - if (! $is_watch_path_triggered && ! is_null($application->watch_paths)) { + if (! $is_watch_path_triggered && ! blank($application->watch_paths)) { return; }