From f1131dfbbb859750cc2b718f79577079c048b411 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 14 Jun 2020 18:15:46 +0900 Subject: [PATCH] Check the whole range of commits in the topic branch (#10560) * Check the whole range of commits in the topic branch * Fix shellcheck * Debug... * Ensure to update to the latest of the base branch... --- ci/test-sanity.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ci/test-sanity.sh b/ci/test-sanity.sh index 9581cf7fba..b67322b294 100755 --- a/ci/test-sanity.sh +++ b/ci/test-sanity.sh @@ -5,8 +5,20 @@ cd "$(dirname "$0")/.." source ci/_ -# Look for failed mergify.io backports -_ git show HEAD --check --oneline +echo --- prepare git show --check + +( + set -x + # Look for failed mergify.io backports by searching leftover conflict markers + # Also check for any trailing whitespaces! + if [[ -n $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]]; then + base_branch=$BUILDKITE_PULL_REQUEST_BASE_BRANCH + else + base_branch=$BUILDKITE_BRANCH + fi + _ git fetch origin "$base_branch" + _ git show "$(git merge-base HEAD "origin/$base_branch")..HEAD" --check --oneline +) _ ci/nits.sh _ ci/check-ssh-keys.sh