Commit f43927b
fix(ci): scope sonarqube workflow to main/develop only to eliminate PR race condition
When sonarqube.yml ran on push to copilot/** branches, it competed with the
pull_request trigger. Branch-mode analysis (push) and PR-mode analysis
(pull_request) both uploaded to SonarCloud; whichever arrived last set the
check status. Branch mode applies a coverage gate (≥80%); PR mode does not.
This caused #347 and #357 to fail intermittently depending on which analysis
completed last.
Fix: only run sonar analysis on pushes to main/develop (branch tracking) and
on pull_request events targeting main/develop (PR analysis in PR mode). PRs
from copilot/** will still get sonar via the pull_request event.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 0b5ab22 commit f43927b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments