3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-18 13:57:39 +00:00

fix: bug with force pushing commits to pr branches

This commit is contained in:
Tonye Jack 2022-11-08 11:06:06 -07:00
parent e062ae86aa
commit 420a7792d0

View file

@ -198,10 +198,10 @@ else
if [[ -z $INPUT_BASE_SHA ]]; then
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
PREVIOUS_SHA=""
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
if ! git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1; then
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
fi
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then