From ac75bd58e998184b4e37c34e094e5dbd546b64ba Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:18:11 -0700 Subject: [PATCH] Exit early if no API changes are found (#6531) Co-authored-by: Chidozie Ononiwu --- eng/common/scripts/Helpers/ApiView-Helpers.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/common/scripts/Helpers/ApiView-Helpers.ps1 b/eng/common/scripts/Helpers/ApiView-Helpers.ps1 index ff73815ea..33c32bf11 100644 --- a/eng/common/scripts/Helpers/ApiView-Helpers.ps1 +++ b/eng/common/scripts/Helpers/ApiView-Helpers.ps1 @@ -171,8 +171,7 @@ function Set-ApiViewCommentForPR { $response = Invoke-WebRequest -Uri $apiviewEndpoint -Method Get -MaximumRetryCount 3 if ($response.StatusCode -ne 200) { LogWarning "API changes are not detected in this pull request." - $commentText += "" - $commentText += "API changes are not detected in this pull request." + exit 0 } else { LogSuccess "APIView identified API level changes in this PR and created $($response.Count) API reviews"