Skip to content

Commit ac430a3

Browse files
jeromerobertGauvain Pocentek
authored and
Gauvain Pocentek
committed
Fix trigger variables in v4 API (#334)
Fix trigger variables in v4 API Close #333
1 parent 9e09cf6 commit ac430a3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

gitlab/v4/objects.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
from __future__ import absolute_import
2020
import base64
2121

22-
import six
23-
2422
from gitlab.base import * # noqa
2523
from gitlab import cli
2624
from gitlab.exceptions import * # noqa
@@ -2080,9 +2078,7 @@ def trigger_pipeline(self, ref, token, variables={}, **kwargs):
20802078
GitlabCreateError: If the server failed to perform the request
20812079
"""
20822080
path = '/projects/%s/trigger/pipeline' % self.get_id()
2083-
form = {r'variables[%s]' % k: v for k, v in six.iteritems(variables)}
2084-
post_data = {'ref': ref, 'token': token}
2085-
post_data.update(form)
2081+
post_data = {'ref': ref, 'token': token, 'variables': variables}
20862082
self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
20872083

20882084
# see #56 - add file attachment features

0 commit comments

Comments
 (0)