Add condition parameter to detect-api-changes template (#6437)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-02-27 15:28:12 -08:00 committed by GitHub
parent c6334c02ad
commit 4ede1a2b0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'))