Fix error in APIView Helper (#6503)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-04-02 15:32:26 -07:00 committed by GitHub
parent d4a6cb30ec
commit da54173ead
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,14 +180,15 @@ function Set-ApiViewCommentForPR {
$commentText += "APIView identified API level changes in this PR and created the following API reviews"
$commentText += ""
$responseContent = $response.Content | ConvertFrom-Json
if ($RepoName.StartsWith(("azure-sdk-for-"))) {
$response | ForEach-Object {
$responseContent | ForEach-Object {
$commentText += "[$($_.packageName)]($($_.url))"
}
} else {
$commentText += "| Language | API Review for Package |"
$commentText += "|----------|---------|"
$response | ForEach-Object {
$responseContent | ForEach-Object {
$commentText += "| $($_.language) | [$($_.packageName)]($($_.url)) |"
}
}