Skip to content

Update MR approval settings for a project

PUT
/api/v4/projects/{id}/merge_request_approval_setting

Updates the merge request approval settings for a specified project.

id
required
One of:
string

The ID or URL-encoded path of the project

Media type application/json
object
allow_author_approval

Allow authors to self-approve merge requests

boolean
nullable
allow_committer_approval

Allow committers to approve merge requests

boolean
nullable
allow_overrides_to_approver_list_per_merge_request

Allow overrides to approver list per merge request

boolean
nullable
retain_approvals_on_push

Retain approval count on a new push

boolean
nullable
selective_code_owner_removals

Reset approvals from Code Owners if their files changed

boolean
nullable
require_password_to_approve

Require approver to authenticate before approving

boolean
nullable
require_reauthentication_to_approve

Require approver to authenticate before approving

boolean
nullable
Example generated
{
"allow_author_approval": true,
"allow_committer_approval": true,
"allow_overrides_to_approver_list_per_merge_request": true,
"retain_approvals_on_push": true,
"selective_code_owner_removals": true,
"require_password_to_approve": true,
"require_reauthentication_to_approve": true
}

OK

Media type application/json
object
allow_author_approval
boolean
allow_committer_approval
boolean
allow_overrides_to_approver_list_per_merge_request
boolean
retain_approvals_on_push
boolean
selective_code_owner_removals
boolean
require_password_to_approve
boolean
require_reauthentication_to_approve
boolean
Example
{
"allow_author_approval": true,
"allow_committer_approval": true,
"allow_overrides_to_approver_list_per_merge_request": true,
"retain_approvals_on_push": true,
"selective_code_owner_removals": true,
"require_password_to_approve": true,
"require_reauthentication_to_approve": true
}

Validation error

Forbidden

Not Found