Skip to content

Commit

Permalink
fix: fix testing workflow ref for branch pushes (#3320)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshgoyalevil authored Oct 23, 2024
1 parent b3eeb01 commit 10fab1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jobs:
name: Checkout repository
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
# Checkout the merge commit instead of the pull request head commit for a pull request
# Fallback to the head commit if its not a pull request
ref: ${{ github.event.pull_request.number != '' && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.ref }}

- if: steps.should_run.outputs.shouldrun == 'true'
name: Check if Node.js project and has package.json
Expand Down

0 comments on commit 10fab1c

Please sign in to comment.