From 15567dd627932f26565f1b75c828852ec18ff49a Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Mon, 22 Feb 2021 08:23:34 +0200 Subject: [PATCH] ci: always execute tests on non-PRs (#13260) --- scripts/ci_check_no_file_changes.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ci_check_no_file_changes.sh b/scripts/ci_check_no_file_changes.sh index 967da5f07..09e6bd1cf 100755 --- a/scripts/ci_check_no_file_changes.sh +++ b/scripts/ci_check_no_file_changes.sh @@ -22,6 +22,10 @@ # to check for python changes, run with CHECKS=python # To check for frontend changes, run with CHECKS=frontend # To check for python and frontend changes, run with CHECKS="python frontend" +if [[ -z ${PR_NUMBER} ]]; then + echo "Not a PR; Exiting with FAILURE code" + exit 1 +fi URL="https://api.github.com/repos/${GITHUB_REPO}/pulls/${PR_NUMBER}/files" FILES=$(curl -s -X GET -G "${URL}" | jq -r '.[] | .filename')