From 5d2ad861469a06e88b9fc0a556b55e1088c58197 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 11 Jun 2021 13:48:24 +0200 Subject: [PATCH] CirrusCi: merge pull requests with target branch (#12667) Co-authored-by: Sebastian Wilzbach --- .cirrus.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 8141478997..a6bf649494 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,6 +4,13 @@ common_steps_template: &COMMON_STEPS_TEMPLATE setup_repos_script: | set -uexo pipefail ln -s $CIRRUS_WORKING_DIR ../dmd + + # for PRs - merge with target branch first + if [ ! -z ${CIRRUS_PR+x} ] ; then + git fetch origin "+refs/pull/$CIRRUS_PR/merge:"; + git checkout -f FETCH_HEAD; + fi + ./ci.sh setup_repos "${CIRRUS_BASE_BRANCH:-$CIRRUS_BRANCH}" build_script: ./ci.sh build