Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement tool for retrieving owners of all repository files. #5135

Closed
konrad-jamrozik opened this issue Jan 13, 2023 · 0 comments
Closed

Implement tool for retrieving owners of all repository files. #5135

konrad-jamrozik opened this issue Jan 13, 2023 · 0 comments
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team.

Comments

@konrad-jamrozik
Copy link
Contributor

konrad-jamrozik commented Jan 13, 2023

We need to be able to deduce which files in given repository have which owners, as we are:

The idea here is to augment the retrieve-codeowners tool with the new ability. This will change its input params, and hence will require upstream dependees changes.

@konrad-jamrozik konrad-jamrozik added the Central-EngSys This issue is owned by the Engineering System team. label Jan 13, 2023
@konrad-jamrozik konrad-jamrozik self-assigned this Jan 13, 2023
ghost pushed a commit that referenced this issue Jan 14, 2023
…r all paths matching given glob path. (#5134)

This PR implements for the `retrieve-codeowners` tool the ability to return not only owners for a single path, but a list of all owners for all paths resolved when matching a glob path given as input.

As such, this PR contributes to:
- #5135

This work is necessary to be able to compare and diff the owners of all files in repository before and after the regex matcher is turned on, per this comment:
- #5088 (review)

In other words, this PR contributes to unblocking to the following PR:
- #5088

And as such, also contributes to:
- #2770

This PR will require some upstream changes, which are captured by:
- #5103

### Additional changes

- Removed logger from `CodeOwnersParser`; replaced with `Console.Out` and `Console.Error`. This addresses the following comment:
    - #5063 (comment)
- Prevented the new regex matcher from matching paths that have `*` in them - such paths are malformed anyway (at least on Windows).
- A lot of assorted changes to surrounding production & test code - please see the file diff for details.

### Implementation notes

This PR leverages [`Microsoft.Extensions.FileSystemGlobbing`](https://www.nuget.org/packages/Microsoft.Extensions.FileSystemGlobbing).
Doc: https://learn.microsoft.com/en-us/dotnet/core/extensions/file-globbing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team.
Projects
None yet
Development

No branches or pull requests

1 participant