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:
commit
4f56809937
1 changed files with 4 additions and 0 deletions
|
@ -223,6 +223,10 @@ else
|
|||
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; 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-parse origin/"$CURRENT_BRANCH")
|
||||
fi
|
||||
else
|
||||
PREVIOUS_SHA=${COMMON_ANCESTOR:-}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue