Skip to content

Commit 72ade19

Browse files
authored
make trigger_pipeline return the pipeline
Trigger_pipeline returns nothing, which makes it difficult to track the pipeline being trigger. Next PR will be about updating a pipeline object to get latest status (not sure yet the best way to do it)
1 parent 1ca3080 commit 72ade19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitlab/v4/objects.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2624,7 +2624,8 @@ def trigger_pipeline(self, ref, token, variables={}, **kwargs):
26242624
"""
26252625
path = '/projects/%s/trigger/pipeline' % self.get_id()
26262626
post_data = {'ref': ref, 'token': token, 'variables': variables}
2627-
self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
2627+
attrs = self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
2628+
return ProjectPipeline(project.pipelines, attrs)
26282629

26292630
@cli.register_custom_action('Project')
26302631
@exc.on_http_error(exc.GitlabHousekeepingError)

0 commit comments

Comments
 (0)