Create Projects::BranchRules::MergeRequestApprovalSetting model
Part of Allow setting approval settings per protected b... (#503805 - closed)
To enable adding approval settings for a protected branch we need to build out the models to store the settings.
The scope for this is limited to protected branches and All branches. We will not support All protected branches in the first iteration.
Currently these settings are stored in 2 places, the project and the project settings. This can be seen in the update service
Currently the attributes are named:
merge_requests_author_approval
merge_requests_disable_committers_approval
disable_overriding_approvers_per_merge_request
reset_approvals_on_push
require_reauthentication_to_approve
selective_code_owner_removals
However, given we are moving them into a dedicated table we should rename these
-
prevent_author_approvalboolean, default false, null false -
prevent_committer_approvalboolean, deafult false, null false -
prevent_editing_approval_rulesboolean, default false, null false -
require_reauthentication_to_approveboolean, default false, null false -
approval_removals-> enum { none: 0, all: 1, code_owners: 2 } default all, null false code owners is default false so we are currently defaulting toallapprovals removed on push.
The model should optionally belong to a protected_branch
Edited by Joe Woodward
