summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-format.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test-format.sh b/tests/test-format.sh
index 7196e260..1dd9cdbd 100755
--- a/tests/test-format.sh
+++ b/tests/test-format.sh
@@ -2,11 +2,13 @@
set -e
-[ -z "$1" ] && exit
-
-basebranch=$1
+if [ -z "$GITHUB_BASE_REF" ]
+then
+ echo "This script is only meant to be run in a GitHub Workflow"
+ exit 1
+fi
-CHANGED_FILES=$(git diff --name-only "$basebranch"...HEAD)
+CHANGED_FILES=$(git diff --name-only "$GITHUB_BASE_REF"...HEAD)
CHANGED=0