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 {
168
168
$commentText = @ ()
169
169
$commentText += " ## API Change Check"
170
170
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 ) {
173
173
LogWarning " API changes are not detected in this pull request."
174
174
$commentText += " "
175
175
$commentText += " API changes are not detected in this pull request."
@@ -179,10 +179,17 @@ function Set-ApiViewCommentForPR {
179
179
$commentText += " "
180
180
$commentText += " APIView identified API level changes in this PR and created the following API reviews"
181
181
$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
+ }
186
193
}
187
194
}
188
195
} catch {
You can’t perform that action at this time.
0 commit comments