Skip to content

Commit

Permalink
Revert "Update base_sha to use the last commit on the current branch …
Browse files Browse the repository at this point in the history
…for push event (#235)" (#237)

This reverts commit d924fcc.
  • Loading branch information
jackton1 committed Oct 27, 2021
1 parent d924fcc commit e11c6b4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions entrypoint.sh
Expand Up @@ -44,14 +44,13 @@ if [[ $exit_status -ne 0 ]]; then
fi

if [[ -z $GITHUB_BASE_REF ]]; then
TARGET_BRANCH=${GITHUB_REF/refs\/heads\//}
CURRENT_BRANCH=$TARGET_BRANCH

if [[ -z $INPUT_BASE_SHA ]]; then
PREVIOUS_SHA=$(git rev-parse "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
PREVIOUS_SHA=$(git rev-parse HEAD^1 2>&1) && exit_status=$? || exit_status=$?
else
PREVIOUS_SHA=$INPUT_BASE_SHA
fi
TARGET_BRANCH=${GITHUB_REF/refs\/heads\//}
CURRENT_BRANCH=$TARGET_BRANCH

if [[ $exit_status -ne 0 ]]; then
echo "::warning::Unable to determine the previous commit sha"
Expand Down

0 comments on commit e11c6b4

Please sign in to comment.