Skip to content

Commit 8456c2e

Browse files
Exit early if no API changes are found (#40608)
Co-authored-by: Chidozie Ononiwu <[email protected]>
1 parent d71855e commit 8456c2e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

eng/common/scripts/Helpers/ApiView-Helpers.ps1

+1-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ function Set-ApiViewCommentForPR {
171171
$response = Invoke-WebRequest -Uri $apiviewEndpoint -Method Get -MaximumRetryCount 3
172172
if ($response.StatusCode -ne 200) {
173173
LogWarning "API changes are not detected in this pull request."
174-
$commentText += ""
175-
$commentText += "API changes are not detected in this pull request."
174+
exit 0
176175
}
177176
else {
178177
LogSuccess "APIView identified API level changes in this PR and created $($response.Count) API reviews"

0 commit comments

Comments
 (0)