Skip to content

Commit

Permalink
fixed bug with since_last_remote commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Dec 19, 2022
1 parent 422b270 commit 23aa7c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions diff-sha.sh
Expand Up @@ -194,12 +194,10 @@ else

if [[ -z $INPUT_BASE_SHA ]]; then
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
echo "::debug::Fetching remote current branch..."

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")
PREVIOUS_SHA=$(git rev-parse "$CURRENT_BRANCH^1")
fi
else
echo "::debug::Fetching remote target branch..."
Expand Down

0 comments on commit 23aa7c2

Please sign in to comment.