Move "Require code owner approval" setting from project interface to protected branches interface
- Backend weight: 3
- Frontend weight: 2
Problem to solve
The CODEOWNERS feature provides greater flexibility than approval rules that are defined for all merge requests. For teams that practice very high velocity development, allowing low risk changes to enter
master very quickly is necessary to achieve this velocity. It is important that high risk changes have a greater level of scrutiny.
GitLab only permits push permissions to protected branches to be controlled at the branch level, but for teams trying maximize velocity, it needs to be possible to divert high risk changes to a merge request workflow, while allowing low risk changes to be merged based on the file paths changed.
The backend and API has already been implemented in https://gitlab.com/gitlab-org/gitlab-ee/issues/10395, but the speed we shipped the API before the interface.
Move the existing Require code owner approval setting from the Merge Request settings, to be available per protected branch.
If this option is enabled, it will:
- block pushes that contain changes to files matched by the
CODEOWNERSfile, requiring a merge request to be used
- block merges where code owners have not approved