From aa5543ac0afd259848fa1ded7345a884dd0dd338 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 56230b7de3..99f0e0cadd 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 @@ -133,7 +133,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 28aeb8c140..4c75515aaa 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', [