sonar

Solid

Check the SonarCloud quality gate for a PR (or the current branch) and drive it to zero. Reports GREEN, or the exact PR-scoped new issues/hotspots/coverage gaps to fix.

AI & Automation 122 stars 33 forks Updated today MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
70
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# `/gflow:sonar [PR#]` — SonarCloud quality gate The reusable Sonar primitive. `/gflow:check` is **local** and cannot see Sonar (it is server-side, post-push); `/gflow:pr-council-review` is an LLM diff review, not the gate verdict. This command answers one question: **is the SonarCloud gate green (zero new issues) for this PR, and if not, exactly what must be fixed?** `$ARGUMENTS` is the PR number. If empty, resolve it from the current branch (`gh pr view --json number -q .number`). Project: key `ffroliva_gflow-cli`, org `ffroliva-github` (see `sonar-project.properties`). The CI scan sets `sonar.qualitygate.wait=true`, so a **green `SonarCloud analysis` check means the gate genuinely passed** — but the gate **API is stale until that check finishes**, so always check the GitHub check FIRST. ## Steps **1. Check the GitHub check first (never trust the gate API while it's pending).** ```bash gh pr checks <N> --json name,state,bucket | \ jq -r '.[] | select(.name=="SonarCloud analysis") | "\(.bucket) \(.state)"' ``` - `pass` → **gate is GREEN / zero new issues. Done.** Report GREEN and stop. - `pending` → the SonarCloud job (~50s) runs *after* the ~3.5min test matrix; wait (`gh pr checks <N> --watch`) before reading the API, or the API returns the previous commit's verdict. - `fail` → continue to step 2 to enumerate the exact failing conditions. **2. Enumerate the failing conditions (PR-scoped — this is the #1 gotcha).** New-code issues live on the PR branch, NOT `m...

Details

Author
ffroliva
Repository
ffroliva/gflow-cli
Created
3 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category