You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't find an option to assign reviewers while creating MR.
As I see, gitlab REST API also doesn't have this option yet (should I also file an issue about it here?)
Reacted by Michael Heyns, Callum Tolley, Spencer Phillip Young and Christoph Thiede
Traceback (most recent call last):
mr.save()
File "/XXXXXXXXXX/.venv/lib/python3.6/site-packages/gitlab/mixins.py", line 385, in save
server_data = self.manager.update(obj_id, updated_data, **kwargs)
File "XXXXXXXXXXXXX/.venv/lib/python3.6/site-packages/gitlab/exceptions.py", line 281, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabUpdateError: 400: assignee_id, assignee_ids, description, labels, add_labels, remove_labels, milestone_id, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked are missing, at least one parameter must be provided
As a workaround for this, you can do the following:
# update the reviewers on the MRupdated_data=mr.manager.update(mr.get_id(), {'reviewer_ids': [1,2,3]})
# for completeness, update the object from the server responseifupdated_data:
mr._update_attrs(updated_data)
Activity
JoelFeiner commentedon Jan 26, 2021
@mary3000 I see
reviewer_idsin the API. Perhaps the documentation just hadn't been updated yet?m00lecule commentedon Feb 9, 2021
Hello! I am also struggling to apply following in
python-gitlab 2.6.0Result:
Traceback (most recent call last): mr.save() File "/XXXXXXXXXX/.venv/lib/python3.6/site-packages/gitlab/mixins.py", line 385, in save server_data = self.manager.update(obj_id, updated_data, **kwargs) File "XXXXXXXXXXXXX/.venv/lib/python3.6/site-packages/gitlab/exceptions.py", line 281, in wrapped_f raise error(e.error_message, e.response_code, e.response_body) from e gitlab.exceptions.GitlabUpdateError: 400: assignee_id, assignee_ids, description, labels, add_labels, remove_labels, milestone_id, remove_source_branch, allow_collaboration, allow_maintainer_to_push, squash, target_branch, title, state_event, discussion_locked are missing, at least one parameter must be providedEdit:
This feature has not been added yet - link
mattiasb commentedon Feb 27, 2021
This should be in now since a couple of days. See here
spyoungtech commentedon Apr 13, 2021
It would also be nice to be able to change the reviewers on an existing merge request.
spyoungtech commentedon Apr 13, 2021
As a workaround for this, you can do the following:
mykolasolodukha commentedon Aug 8, 2022
This might've been closed now since the #1396 is merged.
nejch commentedon Aug 9, 2022
You're right @mykolasolodukha, this does already work. Thanks for the catch!