Implement tools for diffing sets of owners of repo paths; update the regex-based CODEOWNERS matching logic #5165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements tools for diffing list of owners for all files in given repository, allowing one to quickly determine how the resolved list of owners for all repository file paths will change if a different CODEOWNERS matcher is used, or the contents of the file are changed.
And as such, this PR contributes to:
And contributes to providing information necessary to unblock this PR:
Per this comment:
This PR builds upon the logic implemented in:
retrieve-codeownerstool support for returning owners for all paths matching given glob path. #5134Changes made
CodeownersDiffTestsclass, a series of tools to be used manually to diff owners of files based on differing sets of settingsMatchedCodeownersEntry, i.e. the regex-based CODEOWNERS matcher, where the matcher was "eating up slashes too aggressively" when interpreting**, resulting in more matches being made than desired. I added tests toCodeownersFileTeststo cover these cases.