Automated issue management for the Music Assistant support repository.
- Scans issue body for mentions of music and player providers
- Automatically applies corresponding provider labels
- Creates labels dynamically if they don't exist
- Supports 20+ providers with smart alias matching
- Fetches provider manifest files from
music-assistant/serverrepository - Extracts maintainer information from each provider's
manifest.json - Automatically assigns maintainers to relevant issues/PRs
- Skips generic "music_assistant" maintainer
- Falls back to @mentions if assignment fails
- Checks that required issue template sections are filled out
- Validates that log files are attached (not pasted)
- Posts a helpful comment when validation fails with specific issues
- Only comments once to avoid spam
-
20+ comprehensive error patterns detected automatically:
- Authentication & token issues (Spotify, Tidal, generic)
- Network connectivity (timeouts, mDNS/multicast, connection resets)
- Rate limiting (provider-specific and generic)
- Provider-specific errors (Librespot, YouTube Music PO token)
- Playback quality (dropouts, buffering, sync issues)
- Metadata/tag errors
- SSL/certificate problems
- Missing dependencies
- Region restrictions
-
Provider-specific analysis:
- Detects which providers are mentioned in logs
- Applies provider-specific troubleshooting
- Links to relevant documentation
-
Severity classification:
- π¨ Critical (requires immediate attention)
- β Error (blocks functionality)
β οΈ Warning (degraded experience)- βΉοΈ Info (minor issues)
- Uses Claude AI for intelligent log interpretation
- Provides contextual analysis beyond pattern matching
- Identifies root causes and suggests step-by-step solutions
- Determines if issue is a bug or configuration problem
- Requires:
ANTHROPIC_API_KEYsecret in repository settings - Graceful fallback: Works without AI using pattern matching
- Specific, actionable guidance for each detected issue
- Links to official documentation where relevant
- Network troubleshooting for common blockers (Pi-hole, AdGuard, VPN/VLAN)
- Provider-specific auth refresh instructions
- Device-specific recommendations
The bot runs as a GitHub Actions workflow triggered on:
issues.openedandissues.editedpull_request_target.openedandpull_request_target.edited
-
Provider Detection
- Extracts text from issue sections (Music Providers, Player Providers, Problem description)
- Matches against known providers using aliases from
provider_mappings.json - Fetches manifest from:
music-assistant/server/main/music_assistant/providers/{provider}/manifest.json
-
Label & Maintainer Assignment
- Applies provider labels automatically
- Assigns maintainers based on manifest data
- Creates labels dynamically if needed
-
Template Validation
- Checks required sections are completed
- Verifies log attachment (not pasted)
- Posts validation feedback if issues found
-
Log Analysis (Phase 2)
- Downloads attached log files from GitHub
- Runs pattern-based analysis (20+ error patterns)
- Optionally runs AI analysis if API key available
- Posts comprehensive troubleshooting comment
Edit .github/scripts/provider_mappings.json:
{
"music_providers": {
"provider_directory_name": ["alias1", "alias2", "common name"]
},
"player_providers": {
"provider_directory_name": ["alias1", "alias2"]
}
}Example:
{
"music_providers": {
"spotify": ["spotify"],
"youtube_music": ["youtube music", "ytmusic", "yt music"]
}
}To enable AI-powered log analysis:
- Get an Anthropic API key from https://console.anthropic.com/
- Add it as a repository secret:
- Go to repository Settings β Secrets and variables β Actions
- Create new secret:
ANTHROPIC_API_KEY - Paste your API key
Note: The bot works fine without AI analysis - pattern matching alone provides excellent coverage of common issues.
- Spotify, Tidal, Qobuz, YouTube Music, Apple Music
- Deezer, SoundCloud, TuneIn, RadioBrowser
- Plex, Jellyfin, Subsonic
- Filesystem (Local), URL, Builtin, Audiobookshelf
- Slimproto (Squeezebox), Sonos, AirPlay
- Cast (Chromecast/Google Cast), DLNA, Snapcast
- Home Assistant, Fully Kiosk
π¨ Detected: "Player Discovery Issues (mDNS/Multicast)"
Suggestion:
- mDNS/multicast traffic must NOT be blocked
- Check Pi-hole, AdGuard, pfSense settings
- Ensure devices on same Layer 2 network
- VPN/VLAN separation prevents discovery
β Links to troubleshooting guide
β Detected: "Spotify Authentication Issue"
Provider: Spotify
Suggestion:
- Re-authenticate in Settings β Providers β Spotify
- Consider custom Spotify Client ID for better reliability
- Check popup blockers
- Verify Spotify Premium account
β οΈ Detected: "Spotify API Rate Limit"
Suggestion:
- Using default Client ID has heavy rate limiting
- Configure custom Spotify Client ID
- Go to Settings β Providers β Spotify
- Add your own Client ID/Secret
.github/
βββ workflows/
β βββ issue_triage_bot.yml # Triage bot workflow (provider labels, log analysis)
β βββ response_tracker.yml # Response state tracking (needs-attention / waiting-for-user)
β βββ stale_issues.yml # Stale issue auto-close
β βββ lock_threads.yml # Lock closed threads after 30 days
βββ scripts/
βββ triage_bot.py # Main bot logic
βββ log_analyzer.py # Phase 2: Intelligent log analysis
βββ provider_mappings.json # Provider aliases configuration
βββ backfill_labels.py # One-time backfill for response-state labels
βββ README.md # This documentation
Based on extensive research of the Music Assistant codebase and issue history, the log analyzer now detects:
Authentication Issues:
- Token expiration (all providers)
- Spotify-specific auth problems
- Tidal session failures
- Refresh token issues
Network Problems:
- Connection timeouts
- mDNS/multicast blocking
- VPN/VLAN separation
- Connection resets during playback
- Pi-hole/AdGuard/pfSense blocking
Provider-Specific:
- Spotify Librespot timeouts
- Spotify rate limiting (with Client ID solution)
- Tidal rate limiting
- YouTube Music PO token requirements
Playback Issues:
- Audio dropouts
- Buffer underruns
- Player sync/grouping conflicts
Configuration Problems:
- SSL/certificate errors
- Missing Python dependencies
- Region restrictions
- Metadata/tag corruption
When enabled, Claude AI provides:
- Root cause identification from complex log patterns
- Contextual understanding of issue descriptions + logs
- Step-by-step troubleshooting tailored to the specific problem
- Bug vs configuration determination
- Actionable insights beyond simple pattern matching
- Deduplication: Won't post multiple analysis comments
- Severity sorting: Shows most critical issues first
- Provider detection: Only shows relevant provider-specific errors
- Graceful degradation: AI optional, pattern matching always works
- Combined analysis: Shows both pattern-based and AI insights
cd .github/scripts
# Set environment variables
export GITHUB_TOKEN="your_token"
export ISSUE_NUMBER="123"
export ISSUE_BODY="$(gh issue view 123 --json body -q .body)"
export ISSUE_TITLE="$(gh issue view 123 --json title -q .title)"
export REPOSITORY="music-assistant/support"
export IS_PULL_REQUEST="false"
# Optional: Enable AI analysis
export ANTHROPIC_API_KEY="your_api_key"
# Run the bot
python triage_bot.pyfrom log_analyzer import LogAnalyzer
# Test pattern detection
log_content = """
ERROR: Spotify authentication failed
WARNING: Connection timeout while connecting to player
INFO: Rate limit exceeded, retrying in 30s
"""
analyzer = LogAnalyzer(log_content)
issues = analyzer.analyze()
comment = analyzer.generate_comment()
print(comment)The bot outputs detailed logs in GitHub Actions:
- Detected providers
- Labels added
- Maintainers assigned
- Validation issues found
- Log files downloaded
- Pattern matches detected
- AI analysis status
Check the Actions tab for each workflow run's output.
- Edit
provider_mappings.json - Add provider directory name and aliases
- Commit and push
- Edit
log_analyzer.py - Add pattern to
ERROR_PATTERNSdictionary - Specify severity, title, description, suggestion
- Optionally set provider-specific
When providers or patterns change, update:
- This README
- Provider lists in "Supported Providers"
- Example outputs in "Error Detection Examples"
- Python 3.11+
- PyGithub - GitHub API interactions
- requests - HTTP client for manifest fetching and log downloads
- anthropic (optional) - AI-powered log analysis
The workflow requires:
- β
issues: write- Add labels, assign users, post comments - β
pull-requests: write- Triage PRs - β
contents: read- Checkout repository
- Pattern analysis: ~100-500ms for typical log files
- AI analysis: ~2-5 seconds (when enabled)
- Total workflow: ~10-30 seconds including downloads
Automated tracking of which issues need maintainer attention vs. waiting for user response.
| Label | Purpose |
|---|---|
needs-attention |
Issue needs maintainer/collaborator response |
waiting-for-user |
Waiting for the issue author to respond |
stale |
No activity for an extended period |
auto-closed |
Closed automatically due to inactivity |
The response_tracker.yml workflow automatically manages labels based on who comments:
- New/reopened issue β
needs-attentionadded - Maintainer comments (not the issue author) β
needs-attentionremoved,waiting-for-useradded - Issue author comments β
waiting-for-userremoved,needs-attentionadded - Bot/community comments β no label changes
The triage bot also sets waiting-for-user when it posts template validation comments.
View all issues needing your attention:
is:issue is:open label:needs-attention
The stale_issues.yml workflow runs daily and handles two cases:
- Unresponsive users (issues with
waiting-for-user): 14 days β stale warning, 3 more days β auto-close - Dormant issues (general inactivity): 60 days β stale warning, 14 more days β auto-close
Exempt labels: bug-confirmed, enhancement, pinned
The lock_threads.yml workflow locks closed issues after 30 days of inactivity, directing users to open new issues.
Run the one-time backfill script to label all existing open issues:
cd .github/scripts
GITHUB_TOKEN=ghp_xxx python backfill_labels.pyPotential additions:
- Cross-reference with known GitHub issues
- Link to similar resolved issues
- Track error frequency across issues
- Provider status checking (API outages)
- Integration with Discord notifications
- Weekly summary reports of common issues
For issues with the triage bot itself:
- Check GitHub Actions logs for errors
- Verify environment variables are set
- Test locally with sample data
- Open an issue in the support repo
Built using comprehensive research of:
- Music Assistant server codebase error patterns
- Historical issue analysis
- Documentation troubleshooting guides
- Community discussions
Pattern detection based on real-world issues from the Music Assistant community.