From e92598caebc065f89ec98ca8be94f711f5a01b0b Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Wed, 2 Nov 2022 08:09:18 -0600 Subject: [PATCH 1/2] feat: pull initial history --- diff-sha.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diff-sha.sh b/diff-sha.sh index f2ba2b87..e6324e23 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -155,9 +155,11 @@ else CURRENT_BRANCH=$GITHUB_HEAD_REF if [[ -z $INPUT_BASE_SHA ]]; then + git fetch --no-tags -u --progress --depth=30 origin "$TARGET_BRANCH":"$TARGET_BRANCH" PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$? echo "::debug::Previous SHA: $PREVIOUS_SHA" else + git fetch --no-tags -u --progress --depth=30 origin "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$? PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$? fi From f1bc8b08922ee0b12090f4e8702dddebe0ea39b6 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Wed, 2 Nov 2022 08:29:27 -0600 Subject: [PATCH 2/2] Update diff-sha.sh --- diff-sha.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff-sha.sh b/diff-sha.sh index e6324e23..2f95d203 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -155,11 +155,11 @@ else CURRENT_BRANCH=$GITHUB_HEAD_REF if [[ -z $INPUT_BASE_SHA ]]; then - git fetch --no-tags -u --progress --depth=30 origin "$TARGET_BRANCH":"$TARGET_BRANCH" + 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=$? echo "::debug::Previous SHA: $PREVIOUS_SHA" else - git fetch --no-tags -u --progress --depth=30 origin "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$? + 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=$? fi