Approvals API
A customer using approvals, mainly through the API, found some bugs and requests a small enhancement. I think we should do this all in one sweep:
When "approvals_required" is set to 0, and you are calling the api
GET /projects/:id/merge_requests/:merge_request_id/approvals
the fieldapproved_by
stays empty.
This should be changed so that you can still approve something (if you're allowed to so by permissions), even if the required number of approvals is reached.
When performing
POST /projects/:id/merge_requests/:merge_request_id/approvals
the field “approvals_missing” of theGET /projects/:id/merge_requests/:merge_request_id/
does not decrease.
This should just be fixed.
Also the field "approved_by" is not filled with the approver. I think that’s not as designed.
Also to be fixed.
Another nice to have would be the if we were able to set the "approvals_required" field by the API.
I think we should add this.
To do
-
Approved_by should fill even when the required amount is reached or when it's 0 (https://gitlab.com/gitlab-org/gitlab-ee/issues/1118#note_17872289) -
approvals_missing
should work through the API (!846 (merged)) -
approved_by
should work through the API (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/847) -
ability to set approvals_required
through the API