Merge pull request #859 from tj-actions/fix/error-detecting-changed-files-for-closed-prs

fix: error detecting changed files for closed PR's
This commit is contained in:
repo-ranger[bot] 2022-12-14 01:03:14 +00:00 committed by GitHub
commit cd8e421366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,11 +224,6 @@ 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
# shellcheck disable=SC2046
PREVIOUS_SHA=$(git rev-parse origin/"$CURRENT_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
fi
else else
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA