3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-17 19:17:45 +00:00

Merge pull request #787 from tj-actions/fix/bug-with-force-pushing-commits-to-pr-branches

This commit is contained in:
Tonye Jack 2022-11-08 11:26:37 -07:00 committed by GitHub
commit 991e8b3aae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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