From 8fb90ed7f6bf64bddf7f439ae07d60e4cb4489b2 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Mon, 12 Dec 2022 11:14:49 -0700 Subject: [PATCH] Update diff-sha.sh --- diff-sha.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/diff-sha.sh b/diff-sha.sh index f4ca3cb5..d8ef6d6b 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -205,6 +205,10 @@ else fi else PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA + + if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then + PREVIOUS_SHA=$(git merge-base "$PREVIOUS_SHA" "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$? + fi fi if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then @@ -217,10 +221,10 @@ else max_depth=$INPUT_MAX_FETCH_DEPTH for ((i=0; i/dev/null 2>&1; then break