Skip to content

Commit 5e318b4

Browse files
committed
fix: correct git diff command to exclude markdown files in src folder checks
1 parent 277f3bf commit 5e318b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/actions/checkForPackageChanges/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ runs:
3232
3333
3434
if [ "${EVENT_NAME}" = "pull_request" ]; then
35-
changes=$(git diff "${PR_BASE_SHA}".."${PR_HEAD_SHA}" --ignore-all-space --name-only -- src/)
35+
changes=$(git diff "${PR_BASE_SHA}..${PR_HEAD_SHA}" --ignore-all-space --name-only -- \
36+
'src/' ':(glob,exclude)src/**/*.md')
3637
else
3738
# Fetch the parent commit SHA dynamically, ensuring we're always looking at the immediate predecessor.
38-
changes=$(git diff $(git rev-parse "${REF_NAME}^") "${REF_NAME}" --ignore-all-space --name-only -- src/)
39+
changes=$(git diff "$(git rev-parse "${REF_NAME}^")" "${REF_NAME}" --ignore-all-space --name-only -- \
40+
'src/' ':(glob,exclude)src/**/*.md')
3941
fi
4042
4143
if [ -n "$changes" ]; then

0 commit comments

Comments
 (0)