Skip to content

Commit

Permalink
Revert "Sync eng/common directory with azure-sdk-tools for PR 2673 (#…
Browse files Browse the repository at this point in the history
…20198)" (#20204)

This reverts commit 752a736.
  • Loading branch information
sima-zhu authored Feb 3, 2022
1 parent cd49714 commit 86d5d1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eng/common/scripts/Helpers/Metadata-Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ function GetMsAliasFromGithub ($TenantId, $ClientId, $ClientSecret, $GithubUser)
$opsAuthToken = Generate-AadToken -TenantId $TenantId -ClientId $ClientId -ClientSecret $ClientSecret
$Headers["Authorization"] = "Bearer $opsAuthToken"
Write-Host "Fetching aad identity for github user: $GithubUser"
$resp = Invoke-RestMethod $OpensourceAPIBaseURI -Method 'GET' -Headers $Headers -MaximumRetryCount 3
$resp = Invoke-RestMethod $OpensourceAPIBaseURI -Method 'GET' -Headers $Headers
}
catch {
Write-Warning $_
Write-Error $_
return $null
}

Expand All @@ -43,7 +43,7 @@ function GetMsAliasFromGithub ($TenantId, $ClientId, $ClientSecret, $GithubUser)
Write-Host "Fetched aad identity $($resp.aad.alias) for github user $GithubUser."
return $resp.aad.alias
}
Write-Warning "Failed to retrieve the aad identity from given github user: $GithubName"
Write-Error "Failed to retrieve the aad identity from given github user: $GithubName"
return $null
}

Expand All @@ -54,6 +54,6 @@ function GetPrimaryCodeOwner ($TargetDirectory)
Write-Host "Code Owners are $codeOwnerArray."
return $codeOwnerArray[0]
}
Write-Warning "No code owner found in $TargetDirectory."
Write-Error "No code owner found in $TargetDirectory."
return $null
}
4 changes: 4 additions & 0 deletions eng/common/scripts/Update-DocsMsMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ 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
Expand Down

0 comments on commit 86d5d1f

Please sign in to comment.