Support multiple code owners files
Problem
For large repositories (especially monorepos) code owners files can get quite large. Keeping things organized is harder, especially ensuring that entries in one part of the file will not override entries in another part of the file. Also, readability for new users coming on board is difficult.
Finally, changes to the file by multiple parties can create merge conflicts that need to be reconciled manually between multiple parties.
Proposal
Supporting multiple files would solve most of these problems. We could for example support one file per module in the repository, so that each folder can have its own codeowners.yml
entry. Following our CI patterns, we could use a keyword such as includes
for syntax. For example:
# sample code owners file
.gitlab/CODEOWNERS @administrators
include:
- /services/service-one/CODEOWNERS
- /services/service-two/CODEOWNERS
- /services/service-three/CODEOWNERS
Edited by Daniel Gruesso