Pull SonarQube issues, review them, and create JIRA tickets distributed among teammates
Project description
sonar-jira-sync
Pull SonarQube issues, review them in a local web UI, and create JIRA tickets distributed equally among your team.
Features
- Fetch issues from SonarQube, grouped by severity
- Equal distribution of tickets among teammates (round-robin within each severity)
- Local web UI for reviewing issues and approving ticket creation
- CLI with summary and interactive mode
- MCP server for AI assistant integration (Cursor, Claude, etc.)
Installation
pip install sonar-jira-sync
For MCP server support:
pip install sonar-jira-sync[mcp]
Note: If you get
command not found: sonar-jira-syncafter install, your Python scripts directory may not be on PATH. Add it:# Find where pip installed the script pip show -f sonar-jira-sync | grep "Location" # Add to ~/.zshrc (macOS) or ~/.bashrc (Linux) — example for macOS: echo 'export PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:$PATH"' >> ~/.zshrc source ~/.zshrcAlternatively, use
pipx install sonar-jira-syncwhich handles PATH automatically.
Quick Start
- Copy and customize the config:
cp config.example.yaml config.yaml
- Create a
.envfile with your credentials:
SONAR_TOKEN=your-sonarqube-token
JIRA_EMAIL=your-email@company.com
JIRA_TOKEN="your-jira-api-token"
Note: If your token contains special characters like
=, wrap it in double quotes.
- Source the
.envand run:
set -a && source .env && set +a
sonar-jira-sync run
Or get a CLI summary:
sonar-jira-sync summary
Tip: You must source
.envin each new terminal session, or addset -a && source /path/to/.env && set +ato your~/.zshrcfor persistence.
Usage
CLI Commands
| Command | Description |
|---|---|
sonar-jira-sync run |
Launch web UI for interactive review |
sonar-jira-sync summary |
Show issues and distribution preview |
sonar-jira-sync summary -s CRITICAL,MAJOR |
Filter by severity |
sonar-jira-sync mcp |
Start MCP server |
MCP Integration
Add to your Cursor MCP config (~/.cursor/mcp.json):
{
"sonar-jira-sync": {
"command": "sonar-jira-sync",
"args": ["mcp", "-c", "/path/to/config.yaml"],
"env": {
"SONAR_TOKEN": "your-sonarqube-token",
"JIRA_EMAIL": "your-email@company.com",
"JIRA_TOKEN": "your-jira-api-token"
}
}
}
Note: If
sonar-jira-syncis not on your PATH, use the full path to the binary:"command": "/Library/Frameworks/Python.framework/Versions/3.12/bin/sonar-jira-sync"Find it with:
which sonar-jira-syncorpip show -f sonar-jira-sync
Available MCP tools:
fetch_issues- Get SonarQube issues grouped by severitypreview_distribution- Preview ticket distribution among teammatescreate_jiras- Create JIRA tickets (requires explicit confirmation)get_config_info- Show current configuration
Configuration
See config.example.yaml for all options. Sensitive values (tokens) are loaded from environment variables:
| Variable | Purpose |
|---|---|
SONAR_TOKEN |
SonarQube authentication token |
JIRA_EMAIL |
JIRA account email |
JIRA_TOKEN |
JIRA API token |
Publishing to PyPI
Build and upload:
pip install build twine
python -m build
twine upload dist/*
Contributing
- Clone the repo:
git clone https://github.com/arpanroy41/sonar-jira-sync.git
cd sonar-jira-sync
- Install in development mode:
pip install -e ".[dev]"
- Run tests:
pytest
License
MIT
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sonar_jira_sync-0.1.0.tar.gz.
File metadata
- Download URL: sonar_jira_sync-0.1.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de0d393e84c8978b9690478b243c057596c43f3d0cb0db9a3c3306918e6db77e
|
|
| MD5 |
72d72f0fc07dd54801785b5f0f2ea79c
|
|
| BLAKE2b-256 |
5678cfbda2208db5aa67bb7d73f52e0c050c172a953cf12fd9e0fc36c38ea13a
|
File details
Details for the file sonar_jira_sync-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sonar_jira_sync-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a828c9a2a548f475369a36388f0c7c9320bba76307150124036e349b85e60d2c
|
|
| MD5 |
ebe62fb51328d4d972c15eb450cbb4e3
|
|
| BLAKE2b-256 |
192e3c5e1649b3fd006b4927d02a1a7761813d5b22da84c0c02fb3a97b6fc3fa
|