From c2d0aded6debd6e2d4fbbd579e870df88d18272b Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 20 Mar 2025 18:04:36 +0530 Subject: [PATCH] Fix GitHub check URL --- .../Platform/Modules/Functions/Workers/Builds.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 16b2e08be1..5640ce4371 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -1201,7 +1201,13 @@ class Builds extends Action $protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https'; $hostname = System::getEnv('_APP_DOMAIN'); - $providerTargetUrl = "{$protocol}://{$hostname}/console/project-{$project->getId()}/functions/function-{$resource->getId()}"; + + $resourceType = match ($resource->getCollection()) { + 'functions' => 'function', + 'sites' => 'site', + default => throw new \Exception('Invalid resource type') + }; + $providerTargetUrl = "{$protocol}://{$hostname}/console/project-{$project->getId()}/{$resource->getCollection()}/$resourceType-{$resource->getId()}"; $github->updateCommitStatus($repositoryName, $providerCommitHash, $owner, $state, $message, $providerTargetUrl, $name); }