Skip to content

Commit 617d7b4

Browse files
griesChristoph Rosse
andauthored
[11.9] Add source parameter to pipelines API (#708)
Co-authored-by: Christoph Rosse <[email protected]>
1 parent 76ba6d9 commit 617d7b4

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/Api/Projects.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ public function enableRunner(int $project_id, int $runner_id)
338338
* @var string $name the name of the user who triggered pipelines
339339
* @var string $username the username of the user who triggered pipelines
340340
* @var string $order_by order pipelines by id, status, ref, or user_id (default: id)
341-
* @var string $order Sort pipelines in asc or desc order (default: desc).
341+
* @var string $order sort pipelines in asc or desc order (default: desc)
342+
* @var string $source The source of the pipeline
342343
* }
343344
*
344345
* @return mixed
@@ -381,6 +382,24 @@ public function pipelines($project_id, array $parameters = [])
381382
$resolver->setDefined('sort')
382383
->setAllowedValues('sort', ['asc', 'desc'])
383384
;
385+
$resolver->setDefined('source')
386+
->setAllowedValues('source', [
387+
'push',
388+
'web',
389+
'trigger',
390+
'schedule',
391+
'api',
392+
'external',
393+
'pipeline',
394+
'chat',
395+
'webide',
396+
'merge_request_event',
397+
'external_pull_request_event',
398+
'parent_pipeline',
399+
'ondemand_dast_scan',
400+
'ondemand_dast_validation',
401+
]
402+
);
384403

385404
return $this->get($this->getProjectPath($project_id, 'pipelines'), $resolver->resolve($parameters));
386405
}

0 commit comments

Comments
 (0)