Skip to content

Commit

Permalink
feat: include merge commit for push events
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Nov 4, 2022
1 parent ad3a3e0 commit ed9a8c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diff-sha.sh
Expand Up @@ -54,7 +54,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
fi
else
if [[ -z $INPUT_SHA ]]; then
CURRENT_SHA=$(git rev-list --no-merges -n 1 HEAD 2>&1) && exit_status=$? || exit_status=$?
CURRENT_SHA=$(git rev-list -n 1 HEAD 2>&1) && exit_status=$? || exit_status=$?
else
git fetch --no-tags -u --progress --deepen="$INPUT_FETCH_DEPTH"
CURRENT_SHA=$INPUT_SHA; exit_status=$?
Expand Down Expand Up @@ -83,7 +83,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
fi
else
git fetch --no-tags -u --progress --deepen="$INPUT_FETCH_DEPTH"
PREVIOUS_SHA=$(git rev-list --no-merges -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?

if [[ -z "$PREVIOUS_SHA" ]]; then
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
Expand Down

0 comments on commit ed9a8c6

Please sign in to comment.