psax
June 21, 2022, 9:42pm
1
How do I assign multiple reveres to a Merge Request via the API? I have tried the update Merge Request call as documented .
PUT /projects/:id/merge_requests/:merge_request_iid
I’ve tried with with a list of three review_ids like so:
curl --request PUT --header "token" "https://gitlab.com/api/v4/projects/####/merge_requests/#?reviewer_ids=#######,#######,#######"
The result will be only one (the first in the list) reviewer is added to “reviewers”.
"reviewers": [ { "id": ######, "username": "user_name", "name": "name", "state": "active", "avatar_url": "...", "web_url": "..." } ]
I’m using gitlab.com
psax
June 22, 2022, 6:00pm
2
Solved: This reuquires Gitlab premium.
phynet
January 7, 2023, 3:58pm
3
Hi @psax how do you know about this? I have the enterprise account and the same problem you had. Is there any documentation about it?
psax
January 7, 2023, 8:03pm
4
It’s in the REST API docs. Book mark this page. It can be difficult to find via search. https://docs.gitlab.com/ee/api/api_resources.html
psax
January 7, 2023, 8:17pm
5
Er, maybe I didn’t understand your question. I thing I figured this out by experimentation. I’ve come across this issue on a few features because I test on a fork that is not a premium account. The REST API docs do cover premium features but I’m not sure if there is an exhaustive list.
phynet
January 9, 2023, 7:27am
6
@psax After a lot of experimentation as well, it started working. Don’t know why I tried several ways, revisited again, and now works as expected.
Anyway, thank you for answering!