Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab api to get commits in a merge request

From the GITLAB API documentation, I can get the merge request details, from which I can get the source project and the branch.

The api to get the list of commits in the branch, list all the commits in that branch.

Is there a way to get the list of commits specific to a merge request through API.?

The objective is to know only the new commits in the merge request.

Thank You.

like image 726
rupeshj Avatar asked Jul 13 '14 15:07

rupeshj


1 Answers

I think you are looking for this:

curl --header "PRIVATE-TOKEN: ****" "http://gitlab/api/v3/projects/:project_id:/merge_requests/:mr_id:/commits"

https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-commits

like image 140
Frol Avatar answered Oct 04 '22 13:10

Frol