From c925ad8ff2db187f6b1418d8813726338d929cb9 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Tue, 24 Mar 2026 16:37:31 +0530 Subject: [PATCH] fix path trigger --- .../Modules/VCS/Http/GitHub/Deployment.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php index 3647e6efec..c6478e3f80 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php @@ -541,9 +541,17 @@ trait Deployment return false; } - $pathTrigger = new BuildTrigger($resource->getAttribute('providerPaths', [])); - foreach ($providerAffectedFiles as $file) { - if (!$pathTrigger->isValid($file)) { + $providerPaths = $resource->getAttribute('providerPaths', []); + if (!empty($providerPaths) && !empty($providerAffectedFiles)) { + $pathTrigger = new BuildTrigger($providerPaths); + $pathMatched = false; + foreach ($providerAffectedFiles as $file) { + if ($pathTrigger->isValid($file)) { + $pathMatched = true; + break; + } + } + if (!$pathMatched) { Span::add("{$logBase}.build.skipped.reason", 'path'); return false; }