Skip to content

Commit

Permalink
Merge pull request #692 from XeroAPI/fix/trigger-commitlint-on-pr-1
Browse files Browse the repository at this point in the history
feat: trigger commitlint check only on pr
  • Loading branch information
vigneshk-tw authored Nov 5, 2024
2 parents 9d78edc + 5294023 commit e8c221a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/pr-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e8c221a

Please sign in to comment.