@@ -1619,7 +1619,7 @@ class ProjectTrigger(GitlabObject):
1619
1619
_url = '/projects/%(project_id)s/triggers'
1620
1620
canUpdate = False
1621
1621
idAttr = 'token'
1622
- requiredUrlAttrs = ['project_id' ]
1622
+ requiredUrlAttrs = ['project_id' , 'description' ]
1623
1623
1624
1624
1625
1625
class ProjectTriggerManager (BaseManager ):
@@ -2087,7 +2087,7 @@ def share(self, group_id, group_access, **kwargs):
2087
2087
r = self .gitlab ._raw_post (url , data = data , ** kwargs )
2088
2088
raise_error_from_response (r , GitlabCreateError , 201 )
2089
2089
2090
- def trigger_build (self , ref , token , variables = {}, ** kwargs ):
2090
+ def trigger_pipeline (self , ref , token , variables = {}, ** kwargs ):
2091
2091
"""Trigger a CI build.
2092
2092
2093
2093
See https://gitlab.com/help/ci/triggers/README.md#trigger-a-build
@@ -2101,7 +2101,7 @@ def trigger_build(self, ref, token, variables={}, **kwargs):
2101
2101
GitlabConnectionError: If the server cannot be reached.
2102
2102
GitlabCreateError: If the server fails to perform the request.
2103
2103
"""
2104
- url = "/projects/%s/trigger/builds " % self .id
2104
+ url = "/projects/%s/trigger/pipeline " % self .id
2105
2105
form = {r'variables[%s]' % k : v for k , v in six .iteritems (variables )}
2106
2106
data = {'ref' : ref , 'token' : token }
2107
2107
data .update (form )
0 commit comments