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