Skip to content

Commit 7082a6d

Browse files
committed
Use TargetBranch as a fallback
1 parent 0da759b commit 7082a6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pipelines/azure-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pool:
88

99
variables:
1010
# Try to checkout the matching branch, if the command fails, don't care.
11-
BRANCH_NAME: $[coalesce(variables['System.PullRequest.SourceBranch'], replace(variables['Build.SourceBranch'], 'refs/heads/', ''))]
11+
BRANCH_NAME: $[coalesce(variables['System.PullRequest.SourceBranch'], variables['System.PullRequest.TargetBranch'], replace(variables['Build.SourceBranch'], 'refs/heads/', ''))]
1212

1313
resources:
1414
containers:

0 commit comments

Comments
 (0)