Fix SonarQube open issues metric pulling - #4295
Conversation
Changed Packages
|
|
🤖 Finished Review · ✅ Success · Started 2:38 PM UTC · Completed 2:54 PM UTC Commit: |
PR Summary by QodoFix SonarQube open-issues metric for inaccessible projects
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Extra access-check request
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4295 +/- ##
==========================================
+ Coverage 59.58% 59.84% +0.25%
==========================================
Files 2459 2491 +32
Lines 98272 99060 +788
Branches 27448 27573 +125
==========================================
+ Hits 58559 59279 +720
- Misses 39348 39416 +68
Partials 365 365
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
ReviewFindingsLow
Previous runReviewFindingsMedium
Low
Labels: PR fixes a bug in the SonarQube scorecard backend module |
|
🤖 Review · Commit: |
d6a87ae to
2d2ac64
Compare
|
🤖 Review · Commit: |
Signed-off-by: Ihor Mykhno imykhno@redhat.com Assisted-By: Cursor <cursoragent@cursor.com>
2d2ac64 to
0580eca
Compare
|
🤖 Review · ❌ Terminated · Started 10:00 AM UTC · Ended 10:18 AM UTC Commit: |
|
| this.logger.debug(`Fetching open issues count for project ${projectKey}`); | ||
|
|
||
| // Pre-flight: /api/issues/search returns 200 with total: 0 for inaccessible | ||
| // projects, so verify the component exists and is reachable first. |
There was a problem hiding this comment.
[low] edge-case
The pre-flight check adds an extra HTTP round-trip per getOpenIssuesCount call. The sequential approach is the correct trade-off for scorecard metric polling.
| sonarqube: { | ||
| baseUrl: 'https://sonarcloud.io', | ||
| apiKey: 'test-key', | ||
| const config = mockServices.rootConfig({ |
There was a problem hiding this comment.
[low] naming-conventions
Migrating from ConfigReader to mockServices.rootConfig in this file creates a minor inconsistency with sibling test files in the same plugin that still use ConfigReader.
|
🤖 Finished Review · ✅ Success · Started 10:00 AM UTC · Completed 10:18 AM UTC Commit: |



Hey, I just made a Pull Request!
This PR includes a fix for the
SonarQube Open Issuesscorecard card, which is displayed when the SonarQube scorecard module is installed. The issue was identified while testing the module on a private project with restricted access.Below is how the scorecard page looked before the fix (note the
SonarQube Open Issuescard):Below is how the scorecard page looks after the fix:
✔️ Checklist