Allow multiple code owners rules to match a file
Problem to solve
If a certain part of the code changes, I want different types of reviews to happen by different people. For example, I want to define a set of code owners who are responsible for handling security regressions, in addition to the usual code owners.
Intended users
Further details
This might also be relevant for monolithic repositories containing multiple projects. Currently approval rules allow multiple project level rules to be defined, but there is now way to achieve this if they need to vary by directory.
Proposal
Each code owners rule can be scoped with a rule name. For each rule name the last matching line in the code owners file applies.
# If `app/model/repo/foo.rb` was changed both rules would match
# Because they have a different rule name, both would be code owners
/app/model/repo Backend @example_gl-create-be-team
/app/model/repo Frontend @example_gl-create-fe-team