From dfd686436a8373f382a5efe8b4586dc7683dc046 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:52:10 +0530 Subject: [PATCH] Fix fetch commit details condition --- app/controllers/api/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index a0933d17e4..ff332a8c18 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -66,7 +66,7 @@ $redeployVcs = function (Request $request, Document $function, Document $project $branchUrl = "https://github.com/$owner/$repositoryName/tree/$providerBranch"; $commitDetails = []; - if (!$template->isEmpty()) { + if ($template->isEmpty()) { try { $commitDetails = $github->getLatestCommit($owner, $repositoryName, $providerBranch); } catch (\Throwable $error) { @@ -107,8 +107,7 @@ $redeployVcs = function (Request $request, Document $function, Document $project 'search' => implode(' ', [$deploymentId, $entrypoint]), 'activate' => true, ])); - var_dump($deployment); - + $projectId = $project->getId(); $functionId = $function->getId();