Skip to content

Commit 4c4beb6

Browse files
Fix fetch command depth option in list-updated-dirs.sh
1 parent 58ed4f7 commit 4c4beb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/scripts/list-updated-dirs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
# Determine the Git reference to compare against
1111
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
1212
# For pull requests, compare against the base branch
13-
git fetch origin "$GITHUB_BASE_REF" --depth=2 # Fetch base branch with enough depth
13+
git fetch origin "$GITHUB_BASE_REF" --deepen=2 # Fetch base branch with enough depth
1414
base_commit=$(git rev-parse "origin/$GITHUB_BASE_REF")
1515
else
1616
# For push events, ensure enough history is available
17-
git fetch origin --depth=2 # Fetch enough history for HEAD^
17+
git fetch origin --deepen=2 # Fetch enough history for HEAD^
1818
base_commit="HEAD^"
1919
fi
2020

@@ -42,4 +42,4 @@ if [ ${#changed_dirs[@]} -eq 0 ]; then
4242
else
4343
# Use printf to create JSON array
4444
printf '[%s]' "$(printf '"%s",' "${changed_dirs[@]}" | sed 's/,$//')"
45-
fi
45+
fi

0 commit comments

Comments
 (0)