ci: fix branchName in PRs

This commit is contained in:
Jens Langhammer 2020-12-24 16:18:06 +01:00
parent 4998ccbe41
commit 9549a7188b
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') }}
branchName: $(System.PullRequest.SourceBranch)
stages:
- stage: Lint

View File

@ -5,7 +5,7 @@ variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') }}
branchName: $(System.PullRequest.SourceBranch)
stages:
- stage: generate

View File

@ -5,7 +5,7 @@ variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') }}
branchName: $(System.PullRequest.SourceBranch)
stages:
- stage: lint