3

GitLab's documentations say that a merge request can be updated to add one or more reviewers via the reviewer_ids property: https://docs.gitlab.com/ee/api/merge_requests.html#update-mr

What seems strange to me is that certain projects or merge requests or users seem to have the ability to add more than one reviewer to a merge request, while others can only have one reviewer. This is viewable in the UI at gitlab.com, with some merge requests having more than 1 reviewer (see screenshot below), while my free account only seems to allow 1 reviewer on a merge request.

Via the GitLab api, how can I detect whether a given merge request can support more than 1 reviewer? If not at the merge request level, is this something at the project or user level?

For some additional context, I'm working on building a VSCode extension for CodeStream to enable support for GitLab merge requests, and the ability to add reviewers is part of its functionality.

enter image description here

brianc
  • 1,345
  • 3
  • 14
  • 28
  • Interesting, looks like it's not documented separately, but multiple reviewers is available when multiple assignees are too: https://docs.gitlab.com/ee/user/project/merge_requests/getting_started.html#multiple-assignees ; this is a premium+ feature. Don't think you can tell at MR or project level, except it should refuse if multiple reviewers is not available. – Arty-chan Apr 06 '21 at 01:17
  • 1
    @Arty-chan is there anyway to query the api to see if "Premium" is enabled? – brianc Apr 06 '21 at 17:20
  • only at the namespace level but then you need to be a member with the rights to that info which I believe is only Owner. Any public project should have the feature though – Arty-chan Apr 07 '21 at 19:24

0 Answers0