@@ -32,11 +32,14 @@ GitHub repository ID of the SDK. Typically of the form: 'Azure/azure-sdk-for-js'
3232The docker image id in format of '$containerRegistry/$imageName:$tag'
3333e.g. azuresdkimages.azurecr.io/jsrefautocr:latest
3434
35- . PARAMETER PackageSourceOverride
36- Optional parameter to supply a different package source (useful for daily dev
37- docs generation from pacakges which are not published to the default feed). This
38- variable is meant to be used in the domain-specific business logic in
39- &$ValidateDocsMsPackagesFn
35+ . PARAMETER TenantId
36+ The aad tenant id/object id.
37+
38+ . PARAMETER ClientId
39+ The add client id/application id.
40+
41+ . PARAMETER ClientSecret
42+ The client secret of add app.
4043#>
4144
4245param (
@@ -56,10 +59,20 @@ param(
5659 [string ]$DocValidationImageId ,
5760
5861 [Parameter (Mandatory = $false )]
59- [string ]$PackageSourceOverride
62+ [string ]$PackageSourceOverride ,
63+
64+ [Parameter (Mandatory = $false )]
65+ [string ]$TenantId ,
66+
67+ [Parameter (Mandatory = $false )]
68+ [string ]$ClientId ,
69+
70+ [Parameter (Mandatory = $false )]
71+ [string ]$ClientSecret
6072)
6173
6274. (Join-Path $PSScriptRoot common.ps1)
75+ . (Join-Path $PSScriptRoot Helpers Metadata- Helpers.ps1)
6376
6477$releaseReplaceRegex = " (https://github.com/$RepoId /(?:blob|tree)/)(?:master|main)"
6578$TITLE_REGEX = " (\#\s+(?<filetitle>Azure .+? (?:client|plugin|shared) library for (?:JavaScript|Java|Python|\.NET|C)))"
@@ -94,15 +107,18 @@ function GetAdjustedReadmeContent($ReadmeContent, $PackageInfo, $PackageMetadata
94107 }
95108
96109 # Get the first code owners of the package.
97- $author = " ramya-rao-a"
98- $msauthor = " ramyar"
99110 Write-Host " Retrieve the code owner from $ ( $PackageInfo.DirectoryPath ) ."
100- $codeOwnerArray = ." $PSScriptRoot /get-codeowners.ps1" `
101- - TargetDirectory $PackageInfo.DirectoryPath
102- if ($codeOwnerArray ) {
103- Write-Host " Code Owners are $ ( $codeOwnerArray -join " ," ) "
104- $author = $codeOwnerArray [0 ]
105- $msauthor = $author # This is a placeholder for now. Will change to the right ms alias.
111+ $author = GetPrimaryCodeOwner - TargetDirectory $PackageInfo.DirectoryPath
112+ if (! $author ) {
113+ $author = " ramya-rao-a"
114+ $msauthor = " ramyar"
115+ }
116+ else {
117+ $msauthor = GetMsAliasFromGithub - TenantId $TenantId - ClientId $ClientId - ClientSecret $ClientSecret - GithubUser $author
118+ }
119+ # Default value
120+ if (! $msauthor ) {
121+ $msauthor = $author
106122 }
107123 Write-Host " The author of package: $author "
108124 Write-Host " The ms author of package: $msauthor "
0 commit comments