mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-29 13:34:51 +00:00
Merge pull request #740 from tj-actions/feat/pull-initial-history-for-limited-commits
feat: pull initial history when using the default fetch-depth
This commit is contained in:
commit
cbfb0fda5a
1 changed files with 2 additions and 0 deletions
|
@ -155,9 +155,11 @@ else
|
||||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
||||||
|
|
||||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||||
|
git fetch --no-tags -u --progress --deepen=30 origin "$TARGET_BRANCH":"$TARGET_BRANCH"
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
||||||
else
|
else
|
||||||
|
git fetch --no-tags -u --progress --deepen=30 origin "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$?
|
||||||
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue