diff options
author | Pierre Tardy <tardyp@gmail.com> | 2018-01-29 17:44:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 17:44:22 +0100 |
commit | 72ade19046f47b35c1b5ad7333f11fee0dc1e56f (patch) | |
tree | 481a38cfe26f9ad21fb74b923d1c95da4aed1369 /gitlab/v4/objects.py | |
parent | 1ca30807566ca3ac1bd295516a122cd75ba9031f (diff) | |
download | gitlab-72ade19046f47b35c1b5ad7333f11fee0dc1e56f.tar.gz |
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)
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r-- | gitlab/v4/objects.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index f8b0dce..67f80d0 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -2624,7 +2624,8 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject): """ 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) |