CODEOWNERS to support regex
Problem to solve
When dealing with large code bases, usage of CODEOWNERS file improves handling of automatic Approver assignment which is great. However, due to the different way how code can be structured, sometimes a more flexible approach of assigning specific subfolders or files to certain folks is required. In this case CODEOWNERS as currently described for example here https://docs.gitlab.com/ee/user/project/code_owners.html is a bit limited. We would like to request support of regular expressions in the CODEOWNERS file to be more flexible in the way how it can be used.
Intended users
Feature will be used by the repository owners within our organization to setup rules fitting the given org structure.
Further details
A canonical example would be for example to specifiy approvers of certain file types with a set of subfolders, for example:
/src/project/visuals/**/*.html @designer
/src/project/visuals/**/*.rb @developer
/documentation/**/*.html @docs-team
In this particular example I used ** notation to indicate any subfolder. Of course a more suffisticated regular expression implementation can widely improve the usefuleness of the rules within CODEOWNERS file.