summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorCharles <charles.fayal@uconn.edu>2020-01-30 18:52:12 +0200
committerCharles <charles.fayal@uconn.edu>2020-01-30 21:22:26 +0200
commit65ecadcfc724a7086e5f84dbf1ecc9f7a02e5ed8 (patch)
tree0c17bf7272bd8b64a45209d18b795dfc0400d13f /gitlab/v4/objects.py
parent2cf12c7973e139c4932da1f31c33bb7658b132f7 (diff)
downloadgitlab-65ecadcfc724a7086e5f84dbf1ecc9f7a02e5ed8.tar.gz
fix(objects): update set_approvers function call
Added a miss paramter update to the set_approvers function
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 8dca355..6b60583 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -2685,7 +2685,9 @@ class ProjectMergeRequestApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTMan
_update_uses_post = True
@exc.on_http_error(exc.GitlabUpdateError)
- def set_approvers(self, approvals_required, approver_ids=None, approver_group_ids=None, **kwargs):
+ def set_approvers(
+ self, approvals_required, approver_ids=None, approver_group_ids=None, **kwargs
+ ):
"""Change MR-level allowed approvers and approver groups.
Args:
@@ -2700,12 +2702,16 @@ class ProjectMergeRequestApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTMan
approver_ids = approver_ids or []
approver_group_ids = approver_group_ids or []
- path = "%s/%s/approval_rules" % (self._parent.manager.path, self._parent.get_id())
+ path = "%s/%s/approval_rules" % (
+ self._parent.manager.path,
+ self._parent.get_id(),
+ )
data = {
- "approvals_required": approvals_required,
- "rule_type": "regular",
- "user_ids": approver_ids,
- "group_ids": approver_group_ids}
+ "approvals_required": approvals_required,
+ "rule_type": "regular",
+ "user_ids": approver_ids,
+ "group_ids": approver_group_ids,
+ }
self.gitlab.http_put(path, post_data=data, **kwargs)