Skip to content

Commit

Permalink
fix: bug running on pull_request_review (#915)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jan 1, 2023
1 parent 4ca6f66 commit dbfd5e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -12,9 +12,9 @@ on:
- reopened
branches:
- main
# pull_request_review
# branches:
# - main
pull_request_review:
branches:
- main

jobs:
shellcheck:
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Expand Up @@ -182,8 +182,8 @@ runs:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_REF: ${{ github.ref }}
GITHUB_SHA: ${{ github.sha }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }}
GITHUB_HEAD_REF: ${{ github.event.pull_request.head.ref }}
GITHUB_WORKSPACE: ${{ github.workspace }}
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
Expand Down Expand Up @@ -226,7 +226,7 @@ runs:
shell: bash
env:
GITHUB_WORKSPACE: ${{ github.workspace }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }}
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
Expand Down
2 changes: 2 additions & 0 deletions diff-sha.sh
Expand Up @@ -50,6 +50,8 @@ else
echo "Valid git version found: ($GIT_VERSION)"
fi

echo "Base Ref: $GITHUB_BASE_REF"

if [[ -z $GITHUB_BASE_REF ]]; then
echo "Running on a push event..."
TARGET_BRANCH=$GITHUB_REFNAME
Expand Down

0 comments on commit dbfd5e1

Please sign in to comment.