diff --git a/tools/devops/automation/templates/build/build.yml b/tools/devops/automation/templates/build/build.yml index 601ae861ed..af36934169 100644 --- a/tools/devops/automation/templates/build/build.yml +++ b/tools/devops/automation/templates/build/build.yml @@ -49,6 +49,13 @@ steps: submodules: recursive path: s/xamarin-macios + +- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - pwsh: | + git reset --hard HEAD^2 + displayName: "Undo Github merge" + workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-macios + - checkout: maccore clean: true persistCredentials: true # hugely important, else there are some scripts that check a single file from maccore that will fail diff --git a/tools/devops/automation/templates/tests/build.yml b/tools/devops/automation/templates/tests/build.yml index ba0cc4ce6d..79ec21be85 100644 --- a/tools/devops/automation/templates/tests/build.yml +++ b/tools/devops/automation/templates/tests/build.yml @@ -51,6 +51,13 @@ steps: - checkout: self path: s/xamarin-macios + +- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - pwsh: | + git reset --hard HEAD^2 + displayName: "Undo Github merge" + workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-macios + - checkout: maccore persistCredentials: true # hugely important, else there are some scripts that check a single file from maccore that will fail