Skip to content

Commit f43927b

Browse files
bedaHovorkaclaude
andcommitted
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

File tree

.github/workflows/sonarqube.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: SonarQube Analysis
22

33
on:
44
push:
5-
branches: [ main, develop, 'feature/**', 'feat/**', 'fix/**', 'copilot/**', 'claude/**' ]
5+
branches: [ main, develop ]
66
pull_request:
7-
branches: [ main, develop, 'feature/**', 'feat/**', 'fix/**', 'copilot/**', 'claude/**' ]
7+
branches: [ main, develop ]
88
workflow_dispatch: # Allow manual trigger
99

1010
permissions:

0 commit comments

Comments
 (0)