fix: bug retrieving diff with custom a base sha (#945)

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
Tonye Jack
2023-01-11 13:58:50 -07:00
committed by GitHub
parent 988322a381
commit 487675b843
2 changed files with 29 additions and 12 deletions

View File

@@ -223,6 +223,10 @@ else
echo "::debug::Previous SHA: $PREVIOUS_SHA"
else
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
DIFF=".."
fi
fi
echo "::debug::Target branch: $TARGET_BRANCH"