Skip to content

Commit

Permalink
Skip languages that's not supported in APIView
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkuttappan authored and azure-sdk committed May 27, 2021
1 parent faaf3b8 commit 7b38126
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eng/common/scripts/Helpers/ApiView-Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ function MapLanguageName($language)
elseif ($lang -eq "python"){
$lang = "Python"
}
return $lang
return $null
}

function Check-ApiReviewStatus($packageName, $packageVersion, $language, $url, $apiKey)
{
# Get API view URL and API Key to check status
Write-Host "Checking API review status"
$lang = MapLanguageName -language $language
if ($lang -eq $null) {
return
}
$headers = @{ "ApiKey" = $apiKey }
$body = @{
language = $lang
Expand All @@ -44,7 +47,6 @@ function Check-ApiReviewStatus($packageName, $packageVersion, $language, $url, $
}
catch
{
Write-Host "Exception details: $($_.Exception.Response)"
Write-Warning "Failed to check API review status for package $($PackageName). You can check http://aka.ms/azsdk/engsys/apireview/faq for more details on API Approval."
}
}

0 comments on commit 7b38126

Please sign in to comment.