@@ -32,11 +32,14 @@ GitHub repository ID of the SDK. Typically of the form: 'Azure/azure-sdk-for-js'
32
32
The docker image id in format of '$containerRegistry/$imageName:$tag'
33
33
e.g. azuresdkimages.azurecr.io/jsrefautocr:latest
34
34
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.
40
43
#>
41
44
42
45
param (
@@ -56,10 +59,20 @@ param(
56
59
[string ]$DocValidationImageId ,
57
60
58
61
[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
60
72
)
61
73
62
74
. (Join-Path $PSScriptRoot common.ps1)
75
+ . (Join-Path $PSScriptRoot Helpers Metadata- Helpers.ps1)
63
76
64
77
$releaseReplaceRegex = " (https://github.com/$RepoId /(?:blob|tree)/)(?:master|main)"
65
78
$TITLE_REGEX = " (\#\s+(?<filetitle>Azure .+? (?:client|plugin|shared) library for (?:JavaScript|Java|Python|\.NET|C)))"
@@ -94,15 +107,18 @@ function GetAdjustedReadmeContent($ReadmeContent, $PackageInfo, $PackageMetadata
94
107
}
95
108
96
109
# Get the first code owners of the package.
97
- $author = " ramya-rao-a"
98
- $msauthor = " ramyar"
99
110
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
106
122
}
107
123
Write-Host " The author of package: $author "
108
124
Write-Host " The ms author of package: $msauthor "
0 commit comments