Skip to content

Conversation

@mscrivo
Copy link
Contributor

@mscrivo mscrivo commented Feb 11, 2025

This adds the ability to specify unowned_globs for a team. The primary use case of this is to allow more granularity in how ownership globs are defined.

Suppose you want Team A to own everything that has a folder named foo in the path, so you would define a glob like: **/foo/**/* but at the same time, you want Team B to own everything in a specific folder, regardless if it has a foo folder in it or not. So you would define a glob like: shared/**/*, but if it actually has a foo folder in it, then the validation would complain that you cannot have overlapping ownership between teams.

With this, you can now specify that Team does not own shared/**/foo/* and everyone is happy.

To the best of my knowledge, nothing needs to change in the CODEOWNERS generation, since it already puts less specific globs at the top and more specific ones at the bottom. So in effect, the above ownership rules will be enforced just fine.

This fixes #116

@mscrivo mscrivo mentioned this pull request Feb 11, 2025
Copy link
Contributor

@tstannard tstannard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!
We ran this locally and things work for us!
Waiting on @ashleywillard to confirm the logic is correct before merging

@ashleywillard ashleywillard merged commit 39bed6a into rubyatscale:main Feb 21, 2025
2 of 6 checks passed
@ashleywillard
Copy link
Contributor

Thanks for your contribution @mscrivo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support negation globs

4 participants