Skip to content

Commit eda4421

Browse files
Switch to Step Condition (#33960)
1 parent 1669c50 commit eda4421

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

eng/pipelines/templates/stages/archetype-spec-gen-sdk.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -261,24 +261,23 @@ extends:
261261
WorkingDirectory: $(SdkRepoDirectory)
262262
ScriptDirectory: $(SdkRepoDirectory)/eng/common/scripts
263263

264-
- ${{ if not(endsWith(variables['SdkRepoName'], '-pr')) }}:
265-
- task: PowerShell@2
266-
displayName: Create pull request
267-
condition: and(succeeded(), eq(variables['HasChanges'], 'true'), ne(variables['Build.Reason'], 'PullRequest'))
268-
inputs:
269-
pwsh: true
270-
workingDirectory: $(SdkRepoDirectory)
271-
filePath: $(SdkRepoDirectory)/eng/common/scripts/Submit-PullRequest.ps1
272-
arguments: >
273-
-RepoOwner "$(SdkRepoOwner)"
274-
-RepoName "$(SdkRepoName)"
275-
-BaseBranch "main"
276-
-PROwner "azure-sdk"
277-
-PRBranch "$(PrBranch)-$(Build.BuildId)"
278-
-AuthToken "$(azuresdk-github-pat)"
279-
-PRTitle "$(PrTitle)-generated-from-$(Build.DefinitionName)-$(Build.BuildId)"
280-
-PRBody "$(GeneratedSDKInformation)"
281-
-OpenAsDraft $true
264+
- task: PowerShell@2
265+
displayName: Create pull request
266+
condition: and(succeeded(), eq(variables['HasChanges'], 'true'), ne(variables['Build.Reason'], 'PullRequest'), not(endsWith(variables['SdkRepoName'], '-pr')))
267+
inputs:
268+
pwsh: true
269+
workingDirectory: $(SdkRepoDirectory)
270+
filePath: $(SdkRepoDirectory)/eng/common/scripts/Submit-PullRequest.ps1
271+
arguments: >
272+
-RepoOwner "$(SdkRepoOwner)"
273+
-RepoName "$(SdkRepoName)"
274+
-BaseBranch "main"
275+
-PROwner "azure-sdk"
276+
-PRBranch "$(PrBranch)-$(Build.BuildId)"
277+
-AuthToken "$(azuresdk-github-pat)"
278+
-PRTitle "$(PrTitle)-generated-from-$(Build.DefinitionName)-$(Build.BuildId)"
279+
-PRBody "$(GeneratedSDKInformation)"
280+
-OpenAsDraft $true
282281
283282
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
284283
- template: /eng/common/pipelines/templates/steps/detect-api-changes.yml

0 commit comments

Comments
 (0)