Skip to content

[AAASM-3511] 🔧 (ci): Run SonarCloud analysis on dashboard PRs#1185

Merged
Chisanan232 merged 1 commit into
masterfrom
v0.0.1/AAASM-3511/config/sonar_dashboard_pr
Jun 21, 2026
Merged

[AAASM-3511] 🔧 (ci): Run SonarCloud analysis on dashboard PRs#1185
Chisanan232 merged 1 commit into
masterfrom
v0.0.1/AAASM-3511/config/sonar_dashboard_pr

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

Description

The sonar job ("SonarCloud analysis") in .github/workflows/ci.yml was gated
to run only on push events or PRs carrying the manual run-coverage label.
As a result, dashboard-only PRs received no SonarCloud report — the dashboard
JS changes were never analyzed unless someone remembered to apply the label.

This PR adds needs.changes.outputs.dashboard == 'true' to the job's if:
condition so dashboard PRs are analyzed automatically:

-    if: ${{ !cancelled() && needs.changes.result == 'success' && github.actor != 'dependabot[bot]' && (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-coverage')) }}
+    if: ${{ !cancelled() && needs.changes.result == 'success' && github.actor != 'dependabot[bot]' && (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-coverage') || needs.changes.outputs.dashboard == 'true') }}

dashboard is a real output of the changes job (the dorny/paths-filter
dashboard filter). The sonar job already declares needs: [changes, coverage, dashboard-test] and backfills the last successful master Rust LCOV when the
coverage producer is skipped, so on a dashboard PR (coverage skipped,
dashboard-test runs) it scans with just the dashboard JS LCOV — no extra test
runs required.

Type of Change

  • 🔧 Configuration / CI change

Breaking Changes

  • No

Related Issues

  • Related Jira ticket: AAASM-3511

Testing

  • No tests required (explain why)

CI-config-only change to a single job-level if: gate. Validated locally with
actionlint .github/workflows/ci.yml (clean, no findings) and a yaml.safe_load
parse check. The fix takes effect on the next dashboard PR's CI run.

Checklist

  • Code follows project style guidelines (cargo fmt, cargo clippy)
  • Self-review of the diff completed
  • Documentation updated if behaviour changed
  • All CI checks passing
  • Commits are small and follow the Gitmoji convention

🤖 Generated with Claude Code

Add `needs.changes.outputs.dashboard == 'true'` to the sonar job's `if:`
gate so dashboard-only PRs are analyzed automatically instead of only on
push or the manual `run-coverage` label. The job already needs
dashboard-test and backfills the Rust LCOV when coverage is skipped, so a
dashboard PR scans with just the dashboard JS LCOV.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@Chisanan232

Copy link
Copy Markdown
Contributor Author

🔎 Review (Claude Code) — ready for approval

CI: ✅ All green — 37 checks pass, 0 failures.

Scope vs AAASM-3511: ✅ Exactly addresses the root cause. The sonar job ("SonarCloud analysis") was gated github.event_name == 'push' || contains(labels, 'run-coverage'), so dashboard PRs got no SonarCloud report. The one-line change adds || needs.changes.outputs.dashboard == 'true' so dashboard PRs are analyzed automatically — and needs.changes.outputs.dashboard is a real output of the changes job (dorny/paths-filter). The job already backfills the Rust LCOV when coverage is skipped, so a dashboard PR scans cleanly with just the dashboard JS coverage; non-dashboard, non-labelled PRs are unaffected (no extra CI cost). actionlint clean, YAML valid, +1/-1.

Verdict: Minimal, correct, green. Ready to approve & merge. Once merged, subsequent dashboard PRs (incl. #1186/#1187/#1188) will get a SonarCloud check on re-run.

@Chisanan232 Chisanan232 merged commit 50fcfaa into master Jun 21, 2026
39 checks passed
@Chisanan232 Chisanan232 deleted the v0.0.1/AAASM-3511/config/sonar_dashboard_pr branch June 21, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant