From 58ae566dc69a926834e4798bcfe0436ff97c0599 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Mon, 15 Aug 2022 03:20:47 -0600 Subject: [PATCH] fix: error retrieving base sha. (#579) --- diff-sha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff-sha.sh b/diff-sha.sh index aec156cb240..1de5af8c366 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -103,7 +103,7 @@ else echo "::debug::Previous SHA: $PREVIOUS_SHA" fi else - git fetch --no-tags -u --progress origin --depth=1 "$INPUT_BASE_SHA"; exit_status=$? + git fetch --no-tags -u --progress origin --depth=1 "$(git rev-parse --verify "$INPUT_BASE_SHA")"; exit_status=$? PREVIOUS_SHA=$INPUT_BASE_SHA TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1); exit_status=$? echo "::debug::Previous SHA: $PREVIOUS_SHA"