From 6a28d55cbf7c6e71a5ae376ffce47e74537386e8 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Thu, 3 Nov 2022 11:45:56 -0600 Subject: [PATCH] Updated diff-sha.sh --- diff-sha.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diff-sha.sh b/diff-sha.sh index cb05a568..98ed42bc 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -112,6 +112,8 @@ if [[ -z $GITHUB_BASE_REF ]]; then fi fi else + git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$TARGET_BRANCH":"$TARGET_BRANCH" + PREVIOUS_SHA=$INPUT_BASE_SHA TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$? CURRENT_BRANCH=$TARGET_BRANCH