We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4434083 commit a6fcdecCopy full SHA for a6fcdec
.github/workflows/format.yml
@@ -24,7 +24,7 @@ jobs:
24
sudo apt-get -y install clang-format-12
25
26
- name: Check formatting
27
- run: tests/test-format.sh "$GITHUB_BASE_REF"
+ run: tests/test-format.sh
28
29
- name: Upload patches
30
uses: actions/upload-artifact@v3
tests/test-format.sh
@@ -2,11 +2,13 @@
2
3
set -e
4
5
-[ -z "$1" ] && exit
6
-
7
-basebranch=$1
+if [ -z "$GITHUB_BASE_REF" ]
+then
+ echo "This script is only meant to be run in a GitHub Workflow"
8
+ exit 1
9
+fi
10
-CHANGED_FILES=$(git diff --name-only "$basebranch"...HEAD)
11
+CHANGED_FILES=$(git diff --name-only "$GITHUB_BASE_REF"...HEAD)
12
13
CHANGED=0
14
0 commit comments