summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2018-02-05 15:22:34 +0100
committerGitHub <noreply@github.com>2018-02-05 15:22:34 +0100
commit70c779c4243d1807323cc1afc8cbc97918c3b8fc (patch)
tree048e48d6a88446362dbf6038a29d9629682b720c /gitlab
parent6ea7ab73eb6be20c4e8c092044bf0efe421ce4f5 (diff)
parent8134f84f96059dbde72359c414352e2dbe3535e0 (diff)
downloadgitlab-70c779c4243d1807323cc1afc8cbc97918c3b8fc.tar.gz
Merge pull request #420 from tardyp/patch-2
make trigger_pipeline return the pipeline
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/v4/objects.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index f8b0dce..7adf82c 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -2624,7 +2624,9 @@ 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(self.pipelines, attrs)
@cli.register_custom_action('Project')
@exc.on_http_error(exc.GitlabHousekeepingError)