summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-05-23 22:55:02 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2017-05-23 22:55:02 +0200
commit0c3fe39c459d27303e7765c80438e7ade0dda583 (patch)
treeb13203994c8baf2a266e32b1ca452967a0cc2755 /gitlab
parent449f6071feb626df893f26653d89725dd6fb818b (diff)
downloadgitlab-0c3fe39c459d27303e7765c80438e7ade0dda583.tar.gz
[v4] Update triggers endpoint and attrs
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/v4/objects.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 876b572..356cb92 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1619,7 +1619,7 @@ class ProjectTrigger(GitlabObject):
_url = '/projects/%(project_id)s/triggers'
canUpdate = False
idAttr = 'token'
- requiredUrlAttrs = ['project_id']
+ requiredUrlAttrs = ['project_id', 'description']
class ProjectTriggerManager(BaseManager):
@@ -2087,7 +2087,7 @@ class Project(GitlabObject):
r = self.gitlab._raw_post(url, data=data, **kwargs)
raise_error_from_response(r, GitlabCreateError, 201)
- def trigger_build(self, ref, token, variables={}, **kwargs):
+ def trigger_pipeline(self, ref, token, variables={}, **kwargs):
"""Trigger a CI build.
See https://gitlab.com/help/ci/triggers/README.md#trigger-a-build
@@ -2101,7 +2101,7 @@ class Project(GitlabObject):
GitlabConnectionError: If the server cannot be reached.
GitlabCreateError: If the server fails to perform the request.
"""
- url = "/projects/%s/trigger/builds" % self.id
+ url = "/projects/%s/trigger/pipeline" % self.id
form = {r'variables[%s]' % k: v for k, v in six.iteritems(variables)}
data = {'ref': ref, 'token': token}
data.update(form)