-
Notifications
You must be signed in to change notification settings - Fork 183
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
Make improvements to retrieve-codeowners
tool: change accepted params (targetPath
etc.) + refactor
#5104
Conversation
9fe2f95
to
f784ccd
Compare
@@ -0,0 +1,115 @@ | |||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: this file was renamed from CodeOwnersFile
but git didn't pick up on that.
retrieve-codeowners
toolretrieve-codeowners
tool: change accepted params + refactor
retrieve-codeowners
tool: change accepted params + refactorretrieve-codeowners
tool: change accepted params (targetPath
etc.) + refactor
@@ -0,0 +1,58 @@ | |||
using System.Collections.Generic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this file is renamed from MainTests
.
cde15ee
to
a1e7fee
Compare
8b5af31
to
3758b5a
Compare
string targetDirectory, | ||
bool filterOutNonUserAliases = false | ||
) | ||
string targetPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just keep in mind that you will need to update places like https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/get-codeowners.ps1 when you update to the latest package version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weshaggard yeah I already have a PR for that (in draft state as of now). Thanks for the reminder! :)
…ers` executable + add some tests; make assorted refactorings (#5103) This PR is part of work required in preparation to merge: - #5088 Specifically, to enable review of ownership changes due to upcoming wildcards support, as explained in: - #5088 (comment) As such, this PR contributes to: - #2770 This PR is a prerequisite for following PRs: - #5431 ### Merging prerequisite This PR can be merged only after the following PRs are merged and relevant NuGet package published - #5437 - #5104 This is because this PR depends on that NuGet package.
This PR is part of work required in preparation to merge:
Specifically, to enable review of ownership changes due to upcoming wildcards support, as explained in:
As such, this PR contributes to:
Following PR depends on this one:
get-codeowners.ps1
to work with the updatedRetrieveCodeOwners
executable + add some tests; make assorted refactorings #5103Changes made
All changes are within the scope of following paths:
/tools/code-owners-parser/**
/tools/identity-resolutions/Services/GitHubService.cs
/tools/notification-configurator/**
Behavior changes:
RetrieveCodeOwners.Program
now accepts:targetPath
instead oftargetDirectory
excludeNonUserAliases
instead offilterOutNonUserAliases
codeownersFilePathOrUrl
instead ofcodeownersFilePath
Debug.Assert(targetPath != null);
precondition toCodeownersFile.GetMatchingCodeownersEntry
InvalidOperationException
on case that should be impossible.Refactoring changes:
RetrieveCodeOwners.Program
.[c|C]odeOwner
occurrences (except namespaces) to[c|C]odeowners
. E.g.CodeOwnerEntry
toCodeownersEntry
.MainTests
toProgramTests
to follow the test naming convention of<class>Test
not<method>Tests
.CA*
) warnings: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/IDE*
) warnings: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/CodeownersFile
.ProcessCodeownersLine
orIsCommentLine
.targetPath
always comes first, beforecodeownersEntries
.Azure.Sdk.Tools.RetrieveCodeOwners.Tests.ProgramTests
.