Skip to content

Commit da71288

Browse files
committed
.github: test.yml: Check all files on force push and new branch
Signed-off-by: Jorge Marques <[email protected]>
1 parent f1930bd commit da71288

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ jobs:
9292
9393
- name: Lint
9494
run: |
95-
git diff --name-only @~$(( $FETCH_DEPTH - 1 ))..@ | \
96-
xargs pre-commit run --files 2> /dev/null
95+
if [[ "$FETCH_DEPTH_FALLBACK" ]]; then
96+
pre-commit run --all-files 2> /dev/null
97+
else
98+
git diff --name-only @~$(( $FETCH_DEPTH - 1 ))..@ | \
99+
xargs pre-commit run --files 2> /dev/null
100+
fi
97101
ec=$?
98102
git --no-pager diff -U0
99103
exit $ec

0 commit comments

Comments
 (0)