We want to restrict who can merge files, in particular to ensure reviews are done.
Currently we use CODEOWNERS for this purpose. However, CODEOWNERS can lead to review bottlenecks, creating possibly unnecessary hindrances to development, as discussed in the background.
We currently use, in brief:
* @carbon-language/implementation-team
/* @carbon-language/implementation-team
/*.md @carbon-language/carbon-leads @carbon-language/implementation-team
/docs/ @carbon-language/carbon-leads @carbon-language/implementation-team
/proposals/ @carbon-language/carbon-leads
/LICENSE @carbon-language/carbon-leads
CODEOWNERS @carbon-language/carbon-leads
Issue #413: Consider removing CODEOWNERS -- at least for now was used to discuss this issue. This can lead to a few issues:
Remove CODEOWNERS, and instead use commit access to gate PRs.
For people who have access, settings are at:
This should only be done after group access controls are updated. Once done, group access controls are the last word on who can commit PRs.
This PR introduces auto-assignment in order to ensure PRs aren't lost. It provides categories of assignment, and a fallback for other PRs that don't have explicit assignment.
Advice for stacked PRs is no longer "just ask an admin"; it is "commit access required". This is because removing CODEOWNERS removes boundary between merge access to a feature branch and merge access to trunk.
We could keep the current fine-grained CODEOWNERS. In this setup, we would try to have specific directories owned by specific teams.
We've ended up on this path so far so that we have some mechanical enforcement of who's reviewing. We may need to change up the groups a little, but a reasonable long-term expectation would be something like a docs team, an explorer team, a toolchain team, etc, with each owning their own files. For example, /docs is owned only by the docs team, and there are people in the docs team who aren't in other teams (and the other way around).
As previously mentioned, if we were using this option, we may want to change GitHub review settings in order to fix email/assignment.
Advantages:
Disadvantages:
It's mainly because of the relative inflexibility of CODEOWNERS that we aren't doing this.
We could broaden the CODEOWNERS to something basic, like a single group owning everything. Reviews in a particular area become best practice, not mechanically enforced.
Advantages:
Disadvantages:
This option is likely worse for our purposes than fine-grained CODEOWNERS.