How to create a merge request review from the api?

I’m trying to replicate the ability to add reviews to GitLab merge requests in my app and I don’t see anything in the api documentation related to merge request reviews or merge request draft notes.

On the web version of GitLab, when I create a comment on a line of code in a commit and I select ‘Start a review’, I can see a POST to http:///<myProject/-/merge_requests//drafts. If I execute a GET on that, I can see my pending review comment (note) in the response.

Is there anyway to create / read / update / delete merge request reviews with the GitLab api?

2 Likes

Hi @bcanzanella

For your purposes, would it be enough to use the notes API?

I’m not aware of a review API, but please do say if you find something as I could do with using something like this also.

Regards,

Sarah

Hi snim2

I’m using the notes API when creating singular notes (not part of a review), but I want to create an experience like gitlab.com where a merge request review can be submitted from a bunch of pending comments/notes.Those pending notes seem to be stored on the gitlab servers.

thanks!

Sounds interesting!

I’m interested in creating a review comment via the API too. The only endpoint seems to allow the addition of a note which is very different from what is sent in the POST when using the web interface.