diff --git a/.travis.yml b/.travis.yml index 60bea624269..ccdcad8bc4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -306,6 +306,11 @@ jobs: if: type = pull_request php: 7.2 script: + - | + if [ $TRAVIS_BRANCH != "master" ]; then + git fetch origin $TRAVIS_BRANCH; + git branch origin/$TRAVIS_BRANCH FETCH_HEAD + fi - git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow - wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar - php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA