From 4ede1a2b0f42a7839b558ddc7aeb4421fc5db005 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:28:12 -0800 Subject: [PATCH] Add condition parameter to detect-api-changes template (#6437) Co-authored-by: Ben Broderick Phillips --- eng/common/pipelines/templates/steps/detect-api-changes.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/detect-api-changes.yml b/eng/common/pipelines/templates/steps/detect-api-changes.yml index 895a8f757..822a70fff 100644 --- a/eng/common/pipelines/templates/steps/detect-api-changes.yml +++ b/eng/common/pipelines/templates/steps/detect-api-changes.yml @@ -2,13 +2,14 @@ parameters: ArtifactPath: $(Build.ArtifactStagingDirectory) ArtifactName: 'packages' RepoRoot: $(Build.SourcesDirectory) + Condition: true steps: - pwsh: | $apiChangeDetectRequestUrl = "https://apiview.dev/PullRequest/DetectApiChanges" echo "##vso[task.setvariable variable=ApiChangeDetectRequestUrl]$apiChangeDetectRequestUrl" displayName: "Set API change detect request URL" - condition: eq(variables['ApiChangeDetectRequestUrl'], '') + condition: and(${{ parameters.Condition}}, eq(variables['ApiChangeDetectRequestUrl'], '')) - task: Powershell@2 inputs: @@ -24,4 +25,4 @@ steps: -DevopsProject $(System.TeamProject) pwsh: true displayName: Detect API changes - condition: and(succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest')) + condition: and(${{ parameters.Condition }}, succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))