summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-05-23 14:42:44 -0700
committerJohn L. Villalovos <john@sodarock.com>2021-05-25 14:54:13 -0700
commitcb6a3c672b9b162f7320c532410713576fbd1cdc (patch)
tree7d433078cc8fa21b11e50aad75a26c03365e83fc /gitlab
parentcd5993c9d638c2a10879d7e3ac36db06df867e54 (diff)
downloadgitlab-cb6a3c672b9b162f7320c532410713576fbd1cdc.tar.gz
fix: change mr.merge() to use 'post_data'
MR https://github.com/python-gitlab/python-gitlab/pull/1121 changed mr.merge() to use 'query_data'. This appears to have been wrong. From the Gitlab docs they state it should be sent in a payload body https://docs.gitlab.com/ee/api/README.html#request-payload since mr.merge() is a PUT request. > Request Payload > API Requests can use parameters sent as query strings or as a > payload body. GET requests usually send a query string, while PUT > or POST requests usually send the payload body Fixes: #1452 Related to: #1120
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/v4/objects/merge_requests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/v4/objects/merge_requests.py b/gitlab/v4/objects/merge_requests.py
index 9ff72f9..3a878e2 100644
--- a/gitlab/v4/objects/merge_requests.py
+++ b/gitlab/v4/objects/merge_requests.py
@@ -342,7 +342,7 @@ class ProjectMergeRequest(
if merge_when_pipeline_succeeds:
data["merge_when_pipeline_succeeds"] = True
- server_data = self.manager.gitlab.http_put(path, query_data=data, **kwargs)
+ server_data = self.manager.gitlab.http_put(path, post_data=data, **kwargs)
self._update_attrs(server_data)