diff --git a/.github/workflows/pr-health-check.yml b/.github/workflows/pr-health-check.yml index fd085f4f..052de982 100644 --- a/.github/workflows/pr-health-check.yml +++ b/.github/workflows/pr-health-check.yml @@ -32,6 +32,7 @@ jobs: run: npm ci - name: Run commitlint on PR commits + if: github.event_name == 'pull_request' run: | npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose @@ -91,7 +92,10 @@ jobs: owner: xero-internal workflow: pr.yml ref: refs/heads/master - workflow_inputs: '{"branch_name": "${{github.head_ref}}" }' + workflow_inputs: > + { + "branch_name": "${{ github.event_name == 'pull_request' && github.head_ref || 'master' }}" + } - name: Checking SDK health status uses: Codex-/await-remote-run@v1.12.2