File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
eng/common/scripts/Helpers Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -168,8 +168,8 @@ function Set-ApiViewCommentForPR {
168168 $commentText = @ ()
169169 $commentText += " ## API Change Check"
170170 try {
171- $response = Invoke-RestMethod - Uri $apiviewEndpoint - Method Get - MaximumRetryCount 3
172- if ($response.Count -eq 0 ) {
171+ $response = Invoke-WebRequest - Uri $apiviewEndpoint - Method Get - MaximumRetryCount 3
172+ if ($response.StatusCode -ne 200 ) {
173173 LogWarning " API changes are not detected in this pull request."
174174 $commentText += " "
175175 $commentText += " API changes are not detected in this pull request."
@@ -179,10 +179,17 @@ function Set-ApiViewCommentForPR {
179179 $commentText += " "
180180 $commentText += " APIView identified API level changes in this PR and created the following API reviews"
181181 $commentText += " "
182- $commentText += " | Language | API Review for Package |"
183- $commentText += " |----------|---------|"
184- $response | ForEach-Object {
185- $commentText += " | $ ( $_.language ) | [$ ( $_.packageName ) ]($ ( $_.url ) ) |"
182+
183+ if ($RepoName.StartsWith ((" azure-sdk-for-" ))) {
184+ $response | ForEach-Object {
185+ $commentText += " [$ ( $_.packageName ) ]($ ( $_.url ) )"
186+ }
187+ } else {
188+ $commentText += " | Language | API Review for Package |"
189+ $commentText += " |----------|---------|"
190+ $response | ForEach-Object {
191+ $commentText += " | $ ( $_.language ) | [$ ( $_.packageName ) ]($ ( $_.url ) ) |"
192+ }
186193 }
187194 }
188195 } catch {
You can’t perform that action at this time.
0 commit comments