API: Add unscoped `/merge_requests` endpoint
Description
Similar to the /issues
endpoint, provide a /merge_requests
endpoint that is not scoped to a project.
It would makes sense to do this, because the dashboard also allows accessing unscoped merge requests.
Proposal
- Add
/merge_requests
endpoint that returns all merge requests created by the authenticated user. - Possible filters would be (similar to the Dashboard):
assignee_id
author_id
milestones
labels
- Ensure the docs are clear about "List merge requests" and "List project merge requests".
Links / references
Related issues
Proposed documentation
List merge requests
Get all merge requests created by the authenticated user.
GET /merge_requests GET /merge_requests?state=opened GET /merge_requests?state=closed GET /merge_requests?labels=foo GET /merge_requests?labels=foo,bar GET /merge_requests?labels=foo,bar&state=opened GET /merge_requests?milestone=1.0.0 GET /merge_requests?milestone=1.0.0&state=opened GET /merge_requests?iids[]=42&iids[]=43
Attribute Type Required Description state
string no Return all merge requests or just those that are opened
orclosed
labels
string no Comma-separated list of label names, merge requests must have all labels to be returned milestones
string no Comma-separated list of milestone titles iids
Array[integer] no Return only the merge requests having the given iid
assignee_id
integer no Return only merge requests assigned to the user with this id
author_id
integer no Return only merge requests authored by the user with this id
order_by
string no Return requests ordered by created_at
orupdated_at
fields. Default iscreated_at
sort
string no Return requests sorted in asc
ordesc
order. Default isdesc
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/merge_requests