Docs feedback: Merge request search has undocumented filtration possibilities
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
https://docs.gitlab.com/ee/api/search.html#scope-merge_requests-2
According to the documentation, you can only perform basic search upon /api/v4/projects/6/merge_requests
. But it is in fact possible to search based on the source branch by using the key source_branch
as a parameter (in place of search
).
With reference to the documentation, an example request would be: curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/6/merge_requests/source_branch=jaja-test&target_branch=master"
This functionality is very useful if you only have a branch name and want to discover the id of the merge request linked to it.