feat: pull submodule history for pull request events (#1003)

This commit is contained in:
Tonye Jack
2023-02-28 12:47:37 -07:00
committed by GitHub
parent 6f22f2f9ba
commit 04124efe75
3 changed files with 13 additions and 3 deletions

View File

@@ -75,8 +75,11 @@ if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF ]]; then
# shellcheck disable=SC2086
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$SOURCE_BRANCH":refs/remotes/origin/"$SOURCE_BRANCH" 1>/dev/null
fi
# shellcheck disable=SC2086
git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" || true
if git submodule status &>/dev/null; then
# shellcheck disable=SC2086
git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" || true
fi
fi
echo "::debug::Getting HEAD SHA..."
@@ -194,6 +197,11 @@ else
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" 1>/dev/null
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 1>/dev/null || true
fi
if git submodule status &>/dev/null; then
# shellcheck disable=SC2086
git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" || true
fi
fi
echo "::debug::Getting HEAD SHA..."