From 077faa9459be38608dfb8bee9f7c6b600c456889 Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Fri, 21 Mar 2025 14:47:36 +1100 Subject: [PATCH] #832 - set variables to parameters in createPipeline --- src/Api/Projects.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Api/Projects.php b/src/Api/Projects.php index 32aa168a..d4501db2 100644 --- a/src/Api/Projects.php +++ b/src/Api/Projects.php @@ -349,11 +349,7 @@ public function pipelineTestReportSummary(int|string $project_id, int $pipeline_ */ public function createPipeline(int|string $project_id, string $commit_ref, ?array $variables = null): mixed { - $parameters = []; - - if (null !== $variables) { - $parameters['variables'] = $variables; - } + $parameters = $variables ?? []; return $this->post($this->getProjectPath($project_id, 'pipeline'), $parameters, [], [], [ 'ref' => $commit_ref,