3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-02-22 11:17:38 +00:00

Merge pull request #877 from tj-actions/fix/bug-using-since_last_remote_commit-with-force-push

fix: bug using since_last_remote_commit with force push
This commit is contained in:
Tonye Jack 2022-12-16 13:03:11 -07:00 committed by GitHub
commit 4f56809937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,6 +223,10 @@ else
if [[ -z $INPUT_BASE_SHA ]]; then if [[ -z $INPUT_BASE_SHA ]]; then
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
if ! git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1; then
PREVIOUS_SHA=$(git rev-parse origin/"$CURRENT_BRANCH")
fi
else else
PREVIOUS_SHA=${COMMON_ANCESTOR:-} PREVIOUS_SHA=${COMMON_ANCESTOR:-}