Skip to content

Commit e8c221a

Browse files
authored
Merge pull request #692 from XeroAPI/fix/trigger-commitlint-on-pr-1
feat: trigger commitlint check only on pr
2 parents 9d78edc + 5294023 commit e8c221a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/pr-health-check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
run: npm ci
3333

3434
- name: Run commitlint on PR commits
35+
if: github.event_name == 'pull_request'
3536
run: |
3637
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
3738
@@ -91,7 +92,10 @@ jobs:
9192
owner: xero-internal
9293
workflow: pr.yml
9394
ref: refs/heads/master
94-
workflow_inputs: '{"branch_name": "${{github.head_ref}}" }'
95+
workflow_inputs: >
96+
{
97+
"branch_name": "${{ github.event_name == 'pull_request' && github.head_ref || 'master' }}"
98+
}
9599
96100
- name: Checking SDK health status
97101
uses: Codex-/await-remote-run@v1.12.2

0 commit comments

Comments
 (0)