]> git.proxmox.com Git - mirror_edk2.git/commitdiff
.azurepipelines/templates/pr-gate-steps.yml: Fetch target branch
authorSean Brogan <sean.brogan@microsoft.com>
Tue, 24 Nov 2020 19:43:04 +0000 (11:43 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 25 Nov 2020 17:54:11 +0000 (17:54 +0000)
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>
.azurepipelines/templates/pr-gate-steps.yml

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