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>
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