Skip to content

Commit 077faa9

Browse files
author
Ivan Li
committedMar 21, 2025
GitLabPHP#832 - set variables to parameters in createPipeline
1 parent 362450f commit 077faa9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed
 

‎src/Api/Projects.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,7 @@ public function pipelineTestReportSummary(int|string $project_id, int $pipeline_
349349
*/
350350
public function createPipeline(int|string $project_id, string $commit_ref, ?array $variables = null): mixed
351351
{
352-
$parameters = [];
353-
354-
if (null !== $variables) {
355-
$parameters['variables'] = $variables;
356-
}
352+
$parameters = $variables ?? [];
357353

358354
return $this->post($this->getProjectPath($project_id, 'pipeline'), $parameters, [], [], [
359355
'ref' => $commit_ref,

0 commit comments

Comments
 (0)