Skip to content

Commit 26ad4b5

Browse files
Merge #4853
4853: Fix how changed files are selected in stylish-haskell CI check r=newhoggy a=newhoggy The `stylish-haskell` CI had `git diff --name-only HEAD origin/master`, which is wrong because that means added files are not check, but removed files are, which causes `stylish-haskell` to fail because removed files can't be found. The order needed to be swapped around to `git diff --name-only origin/master HEAD` Co-authored-by: John Ky <[email protected]>
2 parents 9ab4b98 + 77ecf13 commit 26ad4b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/stylish-haskell.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Stylish Haskell
1+
name: Check Stylish Haskell
22

33
on:
44
push:
@@ -128,8 +128,8 @@ jobs:
128128
run: |
129129
git add .
130130
git stash
131-
git fetch origin master --unshallow
132-
for x in $(git diff --name-only HEAD origin/master ${{ env.STYLISH_HASKELL_PATHS }}); do
131+
git fetch origin ${{ github.base_ref }} --unshallow
132+
for x in $(git diff --name-only ${{ github.base_ref }} HEAD ${{ env.STYLISH_HASKELL_PATHS }}); do
133133
if [ "${x##*.}" == "hs" ]; then
134134
stylish-haskell -i $x
135135
fi

0 commit comments

Comments
 (0)