Commit f2dc7913 authored by James Ramsay's avatar James Ramsay

Add committer approval API attribute

Merge Requests Approvals can be restricted to prevent the merge
request author or merge request committers from self approving. The
author restriction is already available in the API, but the committer
restriction was not.
parent 4aa824e7
......@@ -73,12 +73,13 @@ POST /projects/:id/approvals
**Parameters:**
| Attribute | Type | Required | Description |
| ------------------------------------------------ | ------- | -------- | ---------------------------------------------------------- |
| ------------------------------------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------- |
| `id` | integer | yes | The ID of a project |
| `approvals_before_merge` | integer | no | How many approvals are required before an MR can be merged |
| `reset_approvals_on_push` | boolean | no | Reset approvals on a new push |
| `disable_overriding_approvers_per_merge_request` | boolean | no | Allow/Disallow overriding approvers per MR |
| `merge_requests_author_approval` | boolean | no | Allow/Disallow authors be able to self approve merge requests |
| `merge_requests_author_approval` | boolean | no | Allow/Disallow authors from self approving merge requests; `true` means authors cannot self approve |
| `merge_requests_disable_committers_approval` | boolean | no | Allow/Disallow committers from self approving merge requests |
```json
{
......@@ -115,7 +116,8 @@ POST /projects/:id/approvals
"approvals_before_merge": 2,
"reset_approvals_on_push": true,
"disable_overriding_approvers_per_merge_request": false,
"merge_requests_author_approval": false
"merge_requests_author_approval": false,
"merge_requests_disable_committers_approval": false
}
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment