Skip to content

Commit

Permalink
Add condition parameter to detect-api-changes template (#8584)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Broderick Phillips <[email protected]>
  • Loading branch information
azure-sdk and benbp authored Feb 27, 2025
1 parent 2a1c936 commit 322c86b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eng/common/pipelines/templates/steps/detect-api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'))

0 comments on commit 322c86b

Please sign in to comment.