summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorCharles <charles.fayal@uconn.edu>2020-02-15 15:20:56 +0200
committerCharles <charles.fayal@uconn.edu>2020-02-15 15:20:56 +0200
commit70c0cfb686177bc17b796bf4d7eea8b784cf9651 (patch)
tree69131eaeb7dc573afb2c44a2e8bdbbca71f2479f /gitlab/v4/objects.py
parent8e0c52620af47a9e2247eeb7dcc7a2e677822ff4 (diff)
downloadgitlab-70c0cfb686177bc17b796bf4d7eea8b784cf9651.tar.gz
fix(objects): add default name data and use http post
Updating approvers new api needs a POST call. Also It needs a name of the new rule, defaulting this to 'name'.
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 6b60583..64442ce 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -2707,12 +2707,13 @@ class ProjectMergeRequestApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTMan
self._parent.get_id(),
)
data = {
- "approvals_required": approvals_required,
+ "name": "name",
+ "self.assertEqual(expected, actual, 'message')pprovals_required": approvals_required,
"rule_type": "regular",
"user_ids": approver_ids,
"group_ids": approver_group_ids,
}
- self.gitlab.http_put(path, post_data=data, **kwargs)
+ self.gitlab.http_post(path, post_data=data, **kwargs)
class ProjectMergeRequestAwardEmoji(ObjectDeleteMixin, RESTObject):