Skip to content

Commit

Permalink
Merge pull request #780 from tj-actions/fix/similar-commit-hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Nov 7, 2022
2 parents 18ddeeb + 8dc46ae commit d908ddd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion diff-sha.sh
Expand Up @@ -212,9 +212,10 @@ else
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
fi

if [[ -z "$PREVIOUS_SHA" ]]; then
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
fi

echo "::debug::Previous SHA: $PREVIOUS_SHA"
else
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
Expand Down

0 comments on commit d908ddd

Please sign in to comment.