Sync eng/common directory with azure-sdk-tools for PR 2673 (#3310)
* Fixed the failures from strict mode. * Update Metadata-Helpers.ps1 Co-authored-by: sima-zhu <sizhu@microsoft.com> Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
This commit is contained in:
parent
679f5ecbd3
commit
dddfbaf296
@ -33,17 +33,17 @@ function GetMsAliasFromGithub ($TenantId, $ClientId, $ClientSecret, $GithubUser)
|
||||
$resp = Invoke-RestMethod $OpensourceAPIBaseURI -Method 'GET' -Headers $Headers
|
||||
}
|
||||
catch {
|
||||
Write-Error $_
|
||||
Write-Warning $_
|
||||
return $null
|
||||
}
|
||||
|
||||
$resp | Write-Verbose
|
||||
|
||||
if ($resp.aad) {
|
||||
Write-Host "Fetched aad identity $($resp.aad.alias) for github user $GithubUser."
|
||||
Write-Host "Fetched aad identity $($resp.aad.alias) for github user $GithubUser. "
|
||||
return $resp.aad.alias
|
||||
}
|
||||
Write-Error "Failed to retrieve the aad identity from given github user: $GithubName"
|
||||
Write-Warning "Failed to retrieve the aad identity from given github user: $GithubName"
|
||||
return $null
|
||||
}
|
||||
|
||||
@ -54,6 +54,6 @@ function GetPrimaryCodeOwner ($TargetDirectory)
|
||||
Write-Host "Code Owners are $codeOwnerArray."
|
||||
return $codeOwnerArray[0]
|
||||
}
|
||||
Write-Error "No code owner found in $TargetDirectory."
|
||||
Write-Warning "No code owner found in $TargetDirectory."
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,10 +225,6 @@ foreach ($packageInfoLocation in $PackageInfoJsonLocations) {
|
||||
if ($ValidateDocsMsPackagesFn -and (Test-Path "Function:$ValidateDocsMsPackagesFn")) {
|
||||
Write-Host "Validating the package..."
|
||||
&$ValidateDocsMsPackagesFn -PackageInfo $packageInfo -PackageSourceOverride $PackageSourceOverride -DocValidationImageId $DocValidationImageId -DocRepoLocation $DocRepoLocation
|
||||
if ($LASTEXITCODE) {
|
||||
LogError "The package failed Doc.Ms validation. Check https://aka.ms/azsdk/docs/docker for more details on how to diagnose this issue."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
Write-Host "Updating the package json ..."
|
||||
UpdateDocsMsMetadataForPackage $packageInfoLocation $packageInfo
|
||||
|
||||
Loading…
Reference in New Issue
Block a user