summary refs log tree commit diff
path: root/.circleci/merge_base_branch.sh
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-10-02 01:08:38 +1000
committerGitHub <noreply@github.com>2018-10-02 01:08:38 +1000
commitabdc141c2bc872e7db6761f652551eb1bbf0859d (patch)
tree356ce41c3e0b038bab84477e0d567b570c9dc1d1 /.circleci/merge_base_branch.sh
parentMerge pull request #3968 from matrix-org/rav/fix_federation_errors (diff)
downloadsynapse-abdc141c2bc872e7db6761f652551eb1bbf0859d.tar.xz
Update instructions to point to pip install (#3985)
Diffstat (limited to '.circleci/merge_base_branch.sh')
-rwxr-xr-x.circleci/merge_base_branch.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/.circleci/merge_base_branch.sh b/.circleci/merge_base_branch.sh
index 9614eb91b6..6b0bf3aa48 100755
--- a/.circleci/merge_base_branch.sh
+++ b/.circleci/merge_base_branch.sh
@@ -9,13 +9,16 @@ source $BASH_ENV
 
 if [[ -z "${CIRCLE_PR_NUMBER}" ]]
 then
-    echo "Can't figure out what the PR number is!"
-    exit 1
+    echo "Can't figure out what the PR number is! Assuming merge target is develop."
+
+    # It probably hasn't had a PR opened yet. Since all PRs land on develop, we
+    # can probably assume it's based on it and will be merged into it.
+    GITBASE="develop"
+else
+    # Get the reference, using the GitHub API
+    GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`
 fi
 
-# Get the reference, using the GitHub API
-GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`
-
 # Show what we are before
 git show -s