forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
…into add_webpubsub_tests * 'main' of https://github.com/Azure/azure-sdk-for-python: [Key Vault] Add support for multi-tenant authentication (Azure#21290) [webpubsub] regen with hub as a client parameter (Azure#21688) update automatic close mechanism (Azure#21580) [Test Proxy] Add fixture to automatically start/stop Docker container (Azure#21538) Update Monitor Query API ref link (Azure#21683) Migration Guide from Azure-loganalytics (Azure#21674) Update docs for Web PubSub GA (Azure#21659) Update CHANGELOG.md (Azure#21681) Increment version for formrecognizer releases (Azure#21678) Increment version for videoanalyzer releases (Azure#21455) Increment version for cognitivelanguage releases (Azure#21566) Increment version for storage releases (Azure#21652) Increment version for communication releases (Azure#21667) raise decode error instead of ContentDecodingError (Azure#19433) Update CHANGELOG.md (Azure#21679) resolve mac agent failure (Azure#21677) Re-add get-codeowners.ps1 (Azure#21676) [SchemaRegistry] remove schema prefix in params (Azure#21675) Validate python docs packages using docker (Azure#21657) update git helper (Azure#21670)
- Loading branch information
Showing
107 changed files
with
2,642 additions
and
1,066 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
param ( | ||
$TargetDirectory, # should be in relative form from root of repo. EG: sdk/servicebus | ||
$RootDirectory, # ideally $(Build.SourcesDirectory) | ||
$VsoVariable = "" # target devops output variable | ||
) | ||
$target = $TargetDirectory.ToLower().Trim("/") | ||
$codeOwnersLocation = Join-Path $RootDirectory -ChildPath ".github/CODEOWNERS" | ||
$ownedFolders = @{} | ||
|
||
if (!(Test-Path $codeOwnersLocation)) { | ||
Write-Host "Unable to find CODEOWNERS file in target directory $RootDirectory" | ||
exit 1 | ||
} | ||
|
||
$codeOwnersContent = Get-Content $codeOwnersLocation | ||
|
||
foreach ($contentLine in $codeOwnersContent) { | ||
if (-not $contentLine.StartsWith("#") -and $contentLine){ | ||
$splitLine = $contentLine -split "\s+" | ||
|
||
# CODEOWNERS file can also have labels present after the owner aliases | ||
# gh aliases start with @ in codeowners. don't pass on to API calls | ||
$ownedFolders[$splitLine[0].ToLower().Trim("/")] = ($splitLine[1..$($splitLine.Length)] ` | ||
| ? { $_.StartsWith("@") } ` | ||
| % { return $_.substring(1) }) -join "," | ||
} | ||
} | ||
|
||
$results = $ownedFolders[$target] | ||
|
||
if ($results) { | ||
Write-Host "Found a folder $results to match $target" | ||
|
||
if ($VsoVariable) { | ||
$alreadyPresent = [System.Environment]::GetEnvironmentVariable($VsoVariable) | ||
|
||
if ($alreadyPresent) { | ||
$results += ",$alreadyPresent" | ||
} | ||
Write-Host "##vso[task.setvariable variable=$VsoVariable;]$results" | ||
} | ||
|
||
return $results | ||
} | ||
else { | ||
Write-Host "Unable to match path $target in CODEOWNERS file located at $codeOwnersLocation." | ||
Write-Host ($ownedFolders | ConvertTo-Json) | ||
return "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.