From a8452dbd9d1d26467e1770b02c18839bd92b7d22 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Tue, 24 Mar 2026 17:31:48 +0530 Subject: [PATCH] filter out null values --- .../Modules/VCS/Http/GitHub/Authorize/External/Update.php | 2 +- src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php index 85f02d510c..e98b3bc3bd 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php @@ -136,7 +136,7 @@ class Update extends Action $prFiles = $github->getPullRequestFiles($owner, $providerRepositoryName, $providerPullRequestId); $providerAffectedFiles = [ ...array_column($prFiles, 'filename'), - ...array_column($prFiles, 'previous_filename') + ...array_filter(array_column($prFiles, 'previous_filename')) // Filter out null values ]; $this->createGitDeployments($github, $providerInstallationId, $repositories, $providerBranch, $providerBranchUrl, $providerRepositoryName, $providerRepositoryUrl, $providerRepositoryOwner, $providerCommitHash, $providerCommitAuthor, $providerCommitAuthorUrl, $providerCommitMessage, $providerCommitUrl, $providerPullRequestId, $providerAffectedFiles, true, $dbForPlatform, $authorization, $queueForBuilds, $getProjectDB, $platform); diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php index c23b87930c..8fe79f6429 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php @@ -215,7 +215,7 @@ class Create extends Action $prFiles = $github->getPullRequestFiles($providerRepositoryOwner, $providerRepositoryName, $providerPullRequestId); $providerAffectedFiles = [ ...array_column($prFiles, 'filename'), - ...array_column($prFiles, 'previous_filename') + ...array_filter(array_column($prFiles, 'previous_filename')) // Filter out null values ]; $repositories = $authorization->skip(fn () => $dbForPlatform->find('repositories', [