PrashantBhanage commented on code in PR #14299:
URL: https://github.com/apache/cloudstack/pull/14299#discussion_r4312520618


##########
.github/workflows/sonar-check.yml:
##########
@@ -76,12 +76,17 @@ jobs:
             const grade     = '${{ steps.grade.outputs.coverage_grade }}';
             const label     = '${{ steps.grade.outputs.coverage_grade_label 
}}';
             const linePct   = '${{ steps.grade.outputs.line_coverage }}';
-            const branchPct = '${{ steps.grade.outputs.branch_coverage }}';
+            const branchPct = '${{ steps.grade.outputs.branch_coverage || 
'N/A' }}';
             const emojiMap  = { A: '🟒', B: '🟑', C: '🟠', D: 'πŸ”΄', F: 'β›”' };
             const emoji     = emojiMap[grade] ?? '❓';
             const runUrl    = 
`${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
             const marker    = '<!-- coverage-grade-bot -->';
 
+            if (!grade || grade === 'N/A') {

Review Comment:
   > when does the grade come through empty here? the script exits before 
writing it when the report is missing, so this step doesnt run then
   
   You’re right, the grade is never empty when this step runs. Removed the 
guard and added the same fork check the Sonar upload step uses, so the comment 
step is skipped on fork PRs



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to