.azurepipelines/templates/pr-gate-steps.yml: Fetch target branch

Add step to fetch target branch so that PR_EVAL can resolve diff

Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Sean Brogan <sean.brogan@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Sean Brogan 2020-11-24 11:43:04 -08:00 committed by mergify[bot]
parent e7bd0dd26d
commit 391610903b
1 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,12 @@ steps:
echo "##vso[task.setvariable variable=pkgs_to_build]${{ parameters.build_pkgs }}" echo "##vso[task.setvariable variable=pkgs_to_build]${{ parameters.build_pkgs }}"
echo "##vso[task.setvariable variable=pkg_count]${{ 1 }}" echo "##vso[task.setvariable variable=pkg_count]${{ 1 }}"
# Fetch the target branch so that pr_eval can diff them.
# Seems like azure pipelines/github changed checkout process in nov 2020.
- script: git fetch origin $(System.PullRequest.targetBranch)
displayName: fetch target branch
condition: eq(variables['Build.Reason'], 'PullRequest')
# trim the package list if this is a PR # trim the package list if this is a PR
- task: CmdLine@1 - task: CmdLine@1
displayName: Check if ${{ parameters.build_pkgs }} need testing displayName: Check if ${{ parameters.build_pkgs }} need testing