summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
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)