Add support for declaring "Code Maintainers" and enforcing approval from said owners for MRs
Description
With big projects that are in mono-repo style structures (Linux, GCC, systemd, Chromium, etc.), it is common for a person or a group of people to principally maintain a portion of the codebase (usually a file or a folder). When code changes from other people are going in, these are the people that have to review and accept the changes for merge.
Today, this is not really possible with GitLab, because there's no way to enforce this relationship in a repository.
Proposal
Add support for a file called .codemaintainers
or similar to declare files and folders being owned by teams or people. When MRs are made against matching files, those teams/people are added as specific additional approvals for those MRs.
For larger open source projects, this is useful for making sure individual maintainers of component subprojects are able to always be part of the review process for contributions.
A bit more generally, it's useful for things like ensuring build/CI script changes trigger review by the people who are responsible for them.
Links / references
- GitHub's implementation: https://github.com/blog/2392-introducing-code-owners
- Linux MAINTAINERS: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS
- Chromium OWNERS: https://chromium.googlesource.com/chromium/src/+/master/OWNERS