Nick2bad4u - SonarCloud Skill

SonarCloud Skill for querying SonarCloud data and closing issues from the command line.

View on GitHub

SonarCloud Skill

latest GitHub release. GitHub stars. GitHub forks. GitHub open issues. GitHub PRs. GitHub license GitHub Dependabot

A Copilot / AI skill for inspecting and managing SonarCloud and SonarQube findings.

This repository provides:


What this skill can do

With a Sonar token in an environment variable, you can:

The helper is repository-agnostic: pass --repo to any local checkout, or pass explicit --project-key / --base-url.


Repository layout

.github/
	skills/
		sonar-manage-findings/
			SKILL.md
			scripts/
				manage_sonar_findings.py
				sonar_manage_api.py
				sonar_manage_common.py
				sonar_manage_diagnostics.py
				sonar_manage_issues.py
				sonar_manage_project.py
				sonar_manage_render.py
README.md
CONTRIBUTING.md
SECURITY.md
CHANGELOG.md

Quick start

1) Prerequisites

2) Set your token (do not pass it on CLI)

PowerShell

$env:SONAR_TOKEN = "<your-token>"

Bash

export SONAR_TOKEN="<your-token>"

3) Run the helper

From repository root:

python ".github/skills/sonar-manage-findings/scripts/manage_sonar_findings.py" summary --repo "."

Machine-readable output:

python ".github/skills/sonar-manage-findings/scripts/manage_sonar_findings.py" summary --repo "." --json

Common commands

# List open/reopened issues
python ".github/skills/sonar-manage-findings/scripts/manage_sonar_findings.py" list-issues --repo "." --issue-statuses OPEN,CONFIRMED,REOPENED

# Show issue activity
python ".github/skills/sonar-manage-findings/scripts/manage_sonar_findings.py" issue-changelog --repo "." --issue AZ123

# Resolve an issue (dry-run first)
python ".github/skills/sonar-manage-findings/scripts/manage_sonar_findings.py" transition-issue --repo "." --issue AZ123 --transition resolve --comment "Fixed in code." --dry-run

# List hotspots awaiting review
python ".github/skills/sonar-manage-findings/scripts/manage_sonar_findings.py" list-hotspots --repo "." --hotspot-status TO_REVIEW --include-details

# Check quality gate
python ".github/skills/sonar-manage-findings/scripts/manage_sonar_findings.py" quality-gate-status --repo "."

For the full command surface and workflows, see:


Security notes

More details: SECURITY.md


Contributing

Contributions are welcome. Please read:


Releases and downloads

This repository includes a release workflow that creates a downloadable zip bundle:

Examples:

# Manual patch bump from main
gh workflow run "Release Skill Bundle" -f release_type=patch -f ref=main

# Manual explicit release version
gh workflow run "Release Skill Bundle" -f release_type=patch -f version=0.2.0 -f ref=main

License

Released under The Unlicense.