Skip to content

Commit

Permalink
make trigger_pipeline return the pipeline
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
tardyp committed Jan 29, 2018
1 parent 1ca3080 commit 72ade19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gitlab/v4/objects.py
Expand Up @@ -2624,7 +2624,8 @@ def trigger_pipeline(self, ref, token, variables={}, **kwargs):
"""
path = '/projects/%s/trigger/pipeline' % self.get_id()
post_data = {'ref': ref, 'token': token, 'variables': variables}
self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
attrs = self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
return ProjectPipeline(project.pipelines, attrs)

@cli.register_custom_action('Project')
@exc.on_http_error(exc.GitlabHousekeepingError)
Expand Down

0 comments on commit 72ade19

Please sign in to comment.