This guide covers the GitHub issue resolution capabilities added in v0.3.0, enhanced issue management features (v0.3.4.post5), and usage examples including milestones, advanced filtering, and complete issue lifecycle management.
- π Overview
- π Prerequisites
- ποΈ Architecture
- π Authentication Setup
- π οΈ Configuration
- π Usage Examples
- π Sub-Issues Management
- π Enhanced Issue Management
- π Analysis Features
- π Token Optimization
- π‘οΈ Safety Features
- π API Reference
- π§ͺ Testing Workflows
- π€ Real-World Examples
- π Best Practices
- β Troubleshooting
- π Future Enhancements
The GitHub integration transforms the Qdrant RAG server into an intelligent issue resolution system that can:
- Analyze GitHub issues using RAG search
- Understand issue context and extract relevant information
- Search your codebase for related code patterns
- Generate fix suggestions with confidence scoring
- Comment on issues with updates, analysis results, and progress
- Create pull requests with automated solutions
- Orchestrate end-to-end resolution workflows
Install the required GitHub dependencies:
# Install via pip
pip install PyGithub>=2.6.1 GitPython>=3.1.44
# Or via uv (recommended)
uv add PyGithub>=2.6.1 GitPython>=3.1.44The integration gracefully degrades if these dependencies are not installed.
The GitHub integration follows a layered architecture design that separates concerns and provides flexibility:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Tools Layer β
β (github_* functions in qdrant_mcp_context_aware.py)β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ
β Workflows Layer β
β (GitHubWorkflows - workflows.py) β
β β
β β’ Orchestrates complex multi-step processes β
β β’ Implements business logic & safety checks β
β β’ Manages analysis β fix β PR workflows β
β β’ Handles dry-run mode and feasibility checks β
βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββ
β β β
βββββββββββββββΌβββ ββββββββββΌβββββββββ βββΌβββββββββββββ
β IssueAnalyzer β β CodeGenerator β β GitHubClient β
β β β β β β
β β’ RAG search β β β’ Fix templates β β β’ API calls β
β β’ Pattern β β β’ Code patches β β β’ Auth β
β extraction β β β’ Confidence β β β’ Rate limit β
β β’ Context β β scoring β β β’ Git ops β
ββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
- Purpose: Direct interface to GitHub API
- Key Methods:
create_issue()- Create new issuescreate_pull_request()- Basic PR creation (requires existing branch)create_pull_request_with_changes()- Full PR workflow with Git operationsadd_comment()- Add comments to issues
- Features:
- Authentication management (PAT and GitHub App)
- Intelligent rate limiting with separate tracking for core/search APIs
- Retry logic with exponential backoff
- User-friendly error messages
- Purpose: Orchestrates complex multi-step workflows
- Key Workflows:
analyze_issue_workflow()- RAG-powered issue analysissuggest_fix_workflow()- Generate automated fixesresolve_issue_workflow()- Complete resolution process
- Features:
- Combines multiple operations into cohesive workflows
- Safety checks and validation
- Feasibility assessment
- Dry-run mode for previewing changes
- Audit logging for compliance
- Purpose: Handle actual file modifications and Git operations
- Key Methods:
prepare_branch()- Clone repo and create branchapply_changes()- Modify files in repositorycommit_and_push()- Commit and push changes
- Features:
- Secure authentication for Git operations
- Temporary repository management
- Automatic cleanup
When you run github_resolve_issue(issue_number=123), here's what happens:
1. MCP Tool receives the command
β
2. GitHubWorkflows.resolve_issue_workflow() starts
β
3. IssueAnalyzer analyzes the issue using RAG search
β
4. CodeGenerator creates fix suggestions
β
5. Workflows evaluates feasibility and safety
β
6. If approved: GitHubClient.create_pull_request_with_changes()
β
7. GitOperations handles branch/commit/push
β
8. Pull request is created with automated fixes- Separation of Concerns: Each layer has a specific responsibility
- Flexibility: Can use components independently or composed
- Safety: Multiple validation layers before making changes
- Testability: Each component can be tested in isolation
- Extensibility: Easy to add new workflows or modify existing ones
You need GitHub API access via one of these methods:
- Personal Access Token (recommended for individual use)
- GitHub App (recommended for organization/team use)
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token" > "Generate new token (classic)"
- Configure your token:
- Name:
qdrant-rag-server - Expiration: Choose appropriate duration
- Scopes: Select required permissions:
repo- Full repository access (for private repos)public_repo- Public repository access (for public repos only)issues- Issue managementpull_requests- PR creation and managementmetadata- Repository metadata access
- Name:
Add to your .env file:
# GitHub Authentication
GITHUB_TOKEN=ghp_your_token_here
# Optional: Default repository
GITHUB_REPO_OWNER=your-username
GITHUB_REPO_NAME=your-repo-name- Go to GitHub Settings > Developer settings > GitHub Apps
- Click "New GitHub App"
- Configure your app:
- GitHub App name:
qdrant-rag-bot - Homepage URL: Your organization URL
- Webhook: Disable for now
- Permissions:
- Repository permissions:
Contents: Read & WriteIssues: Read & WritePull requests: Read & WriteMetadata: Read
- Account permissions: None needed
- Repository permissions:
- GitHub App name:
- After creation, note the App ID
- Generate and download a private key
- Install the app on your repositories
- Note the Installation ID from the installation URL
Add to your .env file:
# GitHub App Authentication
GITHUB_APP_ID=123456
GITHUB_PRIVATE_KEY_PATH=/path/to/your/private-key.pem
GITHUB_INSTALLATION_ID=12345678
# Optional: Default repository
GITHUB_REPO_OWNER=your-org
GITHUB_REPO_NAME=your-repoThe GitHub integration can be configured via config/server_config.json:
{
"github": {
"authentication": {
"token": "${GITHUB_TOKEN:-}",
"app_id": "${GITHUB_APP_ID:-}",
"private_key_path": "${GITHUB_PRIVATE_KEY_PATH:-}",
"installation_id": "${GITHUB_INSTALLATION_ID:-}"
},
"api": {
"base_url": "${GITHUB_API_URL:-https://api.github.com}",
"timeout": 30,
"retry_attempts": 3,
"retry_delay": 1.0,
"rate_limit_buffer": 100
},
"repository": {
"current_owner": "${GITHUB_REPO_OWNER:-}",
"current_repo": "${GITHUB_REPO_NAME:-}",
"auto_index_on_switch": true
},
"issues": {
"default_state": "open",
"max_fetch_count": 50,
"analysis": {
"search_limit": 5, // Reduced for token optimization (v0.3.4.post1)
"context_expansion": true, // Include surrounding code chunks
"include_dependencies": false, // Disabled for token optimization (v0.3.4.post1)
"code_similarity_threshold": 0.7,
"response_verbosity": "summary", // Return summary not full results (v0.3.4.post1)
"include_raw_search_results": false,
"max_relevant_files": 5,
"truncate_content": true,
"content_preview_length": 200,
"progressive_context": { // New in v0.3.4.post1
"enabled": true,
"default_level": "class", // Default context granularity
"bug_level": "method", // Bugs need method-level detail
"feature_level": "file" // Features need file-level overview
}
}
},
"safety": {
"dry_run_by_default": true,
"require_confirmation": true,
"max_files_per_pr": 10,
"blocked_file_patterns": [
"*.key", "*.pem", "*.env", "secrets/**", ".github/workflows/**"
]
}
}
}The GitHub integration provides 10 MCP tools accessible through Claude Code's natural language interface:
# Authentication and repository management
"List my repositories"
"Switch to repository owner/repo-name"
"Check GitHub health status"
# Issue management
"Show me open issues with bug label"
"Get details for issue #123"
"Create a test issue with title 'Bug in login' and labels 'bug,urgent'"
# Analysis and resolution
"Analyze issue #123 using RAG search"
"Generate fix suggestions for issue #123"
"Resolve issue #123 in dry-run mode"
"Create a pull request for issue fix"
All GitHub functionality is also available via HTTP endpoints for testing and integration:
# Test GitHub connection
curl http://localhost:8081/github/health
# List repositories
curl http://localhost:8081/github/repositories
# Switch repository context
curl -X POST http://localhost:8081/github/switch_repository \
-H "Content-Type: application/json" \
-d '{"owner": "myorg", "repo": "myproject"}'# Fetch issues
curl "http://localhost:8081/github/issues?state=open&limit=5"
# Get specific issue
curl http://localhost:8081/github/issues/123
# Create test issue
curl -X POST http://localhost:8081/github/issues \
-H "Content-Type: application/json" \
-d '{
"title": "Test Issue: Sample bug for testing",
"body": "This is a test issue for GitHub integration testing.",
"labels": ["test", "bug"],
"assignees": ["username"]
}'
# Add comment to issue
curl -X POST http://localhost:8081/github/issues/123/comment \
-H "Content-Type: application/json" \
-d '{
"issue_number": 123,
"body": "Thanks for reporting this issue! We are investigating."
}'# Analyze issue with RAG search
curl -X POST http://localhost:8081/github/issues/123/analyze
# Generate fix suggestions
curl -X POST http://localhost:8081/github/issues/123/suggest_fix
# Test resolution workflow (dry run)
curl -X POST http://localhost:8081/github/issues/123/resolve?dry_run=true
# Create pull request
curl -X POST http://localhost:8081/github/pull_requests \
-H "Content-Type: application/json" \
-d '{
"title": "Fix: Resolve authentication bug",
"body": "This PR fixes the issue described in #123",
"head": "fix-auth-bug",
"base": "main"
}'Use the provided script for comprehensive HTTP API testing:
# Make the script executable
chmod +x tests/integration/github/test_github_http_api.sh
# Run comprehensive tests
./tests/integration/github/test_github_http_api.sh
# Test specific operations
./tests/integration/github/test_github_http_api.sh --test-auth
./tests/integration/github/test_github_http_api.sh --test-issues
./tests/integration/github/test_github_http_api.sh --test-analysis# 1. Switch to repository context (MCP)
"Switch to repository myorg/myproject"
# 2. List recent issues (MCP)
"Show me the last 10 open issues"
# 3. Get detailed issue information (MCP)
"Get details for issue #123"
# 4. Analyze issue with RAG search (MCP)
"Analyze issue #123 using RAG search to find related code"
# 5. Generate fix suggestions (MCP)
"Generate fix suggestions for issue #123"
# 6. Test resolution workflow (MCP dry run)
"Resolve issue #123 in dry-run mode to see what would be done"
# 7. Create actual PR when ready (MCP)
"Create a pull request to resolve issue #123"# List your repositories
github_list_repositories
# List organization repositories
github_list_repositories owner="myorg"
# Switch context to different repository
github_switch_repository owner="myorg" repo="backend-api"
# Add comment to issue
github_add_comment issue_number=123 body="Investigation complete. Fix incoming!"# Analyze a bug report
github_analyze_issue issue_number=456
# The analysis includes:
# - Issue classification (bug, feature, performance, etc.)
# - Error pattern extraction
# - Code reference identification
# - RAG search results for related code
# - Confidence scoring
# - Implementation recommendations# Generate automated fix suggestions
github_suggest_fix issue_number=789
# Suggestions include:
# - Code modifications with templates
# - New file recommendations
# - Test suggestions
# - Safety warnings
# - Implementation feasibility assessment# Manual PR creation
github_create_pull_request \
title="Fix authentication bug in login flow" \
body="This PR fixes the issue described in #123" \
head="fix-auth-bug" \
base="main"GitHub sub-issues (task lists) enable hierarchical issue organization for complex features and projects.
Sub-issues provide:
- Hierarchical Organization: Parent issues can have multiple sub-tasks
- Progress Tracking: See completion status across all sub-issues
- Dependency Management: Understand task relationships
- Projects V2 Integration: Bulk-add sub-issues to project boards
# Via Claude Code (MCP)
"Create a sub-task for issue #123 titled 'Implement user authentication'"
# Via HTTP API
curl -X POST http://localhost:8081/github/create_sub_issue \
-H "Content-Type: application/json" \
-d '{
"parent_issue_number": 123,
"title": "Implement user authentication",
"body": "Add OAuth2 authentication flow",
"labels": ["enhancement", "backend"]
}'# Via Claude Code
"Add issue #456 as a sub-issue of #123"
# Via HTTP API
curl -X POST http://localhost:8081/github/add_sub_issue \
-H "Content-Type: application/json" \
-d '{
"parent_issue_number": 123,
"sub_issue_number": 456
}'# Via Claude Code
"List all sub-issues for issue #123"
"Show me the sub-tasks of #123"
# Via HTTP API
curl -X POST http://localhost:8081/github/list_sub_issues \
-H "Content-Type: application/json" \
-d '{"parent_issue_number": 123}'
# Response example:
{
"parent_issue": 123,
"sub_issues_count": 3,
"sub_issues": [
{
"number": 456,
"title": "Implement user authentication",
"state": "open",
"assignee": "developer1"
},
{
"number": 457,
"title": "Add database migrations",
"state": "closed",
"assignee": "developer2"
}
]
}# Via Claude Code
"Remove sub-issue #456 from parent #123"
# Via HTTP API
curl -X POST http://localhost:8081/github/remove_sub_issue \
-H "Content-Type: application/json" \
-d '{
"parent_issue_number": 123,
"sub_issue_number": 456
}'# Via Claude Code
"Reorder sub-issues for #123: put #458 first, then #456, then #457"
# Via HTTP API
curl -X POST http://localhost:8081/github/reorder_sub_issues \
-H "Content-Type: application/json" \
-d '{
"parent_issue_number": 123,
"sub_issue_numbers": [458, 456, 457]
}'Move a sub-issue to a different parent:
# Via Claude Code
"Move sub-issue #456 from parent #123 to parent #789"
# Via HTTP API (with replace_parent=true)
curl -X POST http://localhost:8081/github/add_sub_issue \
-H "Content-Type: application/json" \
-d '{
"parent_issue_number": 789,
"sub_issue_number": 456,
"replace_parent": true
}'Automatically add all sub-issues to a project:
# Via Claude Code
"Add all sub-issues of #123 to project PVT_kwDOAdYevc4A7ABC"
# Via HTTP API
curl -X POST http://localhost:8081/github/add_sub_issues_to_project \
-H "Content-Type: application/json" \
-d '{
"project_id": "PVT_kwDOAdYevc4A7ABC",
"parent_issue_number": 123
}'
# Response includes:
{
"added_count": 3,
"failed_count": 0,
"sub_issues": [
{
"issue_number": 456,
"item_id": "PVTI_lADOAdYevc4A7ABC",
"applied_fields": {
"Status": "In Progress",
"Priority": "High"
}
}
]
}# 1. Create parent issue
"Create issue 'Implement user dashboard' with label 'epic'"
# 2. Create sub-tasks
"Create sub-issue for #100 titled 'Design dashboard UI'"
"Create sub-issue for #100 titled 'Implement API endpoints'"
"Create sub-issue for #100 titled 'Add unit tests'"
"Create sub-issue for #100 titled 'Write documentation'"
# 3. Add all to project board
"Add all sub-issues of #100 to the current sprint project"# 1. Create a parent issue for organization
"Create issue 'Q1 Performance Improvements' as an epic"
# 2. Link existing issues as sub-issues
"Add issue #45 as sub-issue of #200" # Database optimization
"Add issue #67 as sub-issue of #200" # Cache implementation
"Add issue #89 as sub-issue of #200" # Query optimization
# 3. Reorder by priority
"Reorder sub-issues for #200: #89, #45, #67"- Use Clear Hierarchies: Keep parent issues high-level, sub-issues specific
- Consistent Labeling: Sub-issues inherit parent labels by default
- Progress Tracking: Close sub-issues to track parent progress
- Avoid Deep Nesting: GitHub supports one level of sub-issues only
- Projects Integration: Use bulk-add for better project management
- API Implementation: Uses GitHub REST API with preview headers (PyGithub doesn't support sub-issues)
- Parameter Naming: API uses
sub_issue_idbut accepts issue numbers for current repository - Limitations: One level of hierarchy only (no sub-sub-issues)
- Permissions: Requires write access to both parent and sub-issues
The v0.3.4.post5 release adds comprehensive issue lifecycle management tools, milestone support, and advanced filtering capabilities for complete release management workflows.
# Via Claude Code (MCP)
"Close issue #123 as completed"
"Close issue #456 as not planned with comment 'Duplicate of #123'"
"Close issue #789 as duplicate"
# Via HTTP API
curl -X PATCH http://localhost:8081/github/issues/123/close \
-H "Content-Type: application/json" \
-d '{
"reason": "completed",
"comment": "Fixed in PR #124"
}'
# State reasons:
# - completed: Issue was resolved
# - not_planned: Won't be implemented
# - duplicate: Duplicate of another issue# Via Claude Code
"Assign issue #123 to developer1 and developer2"
"Unassign developer1 from issue #123"
"Assign issue #456 to @me"
# Via HTTP API - Assign users
curl -X POST http://localhost:8081/github/issues/123/assignees \
-H "Content-Type: application/json" \
-d '{
"assignees": ["developer1", "developer2"],
"operation": "add"
}'
# Unassign users
curl -X POST http://localhost:8081/github/issues/123/assignees \
-H "Content-Type: application/json" \
-d '{
"assignees": ["developer1"],
"operation": "remove"
}'# Via Claude Code
"Update issue #123 title to 'Critical: Authentication bug'"
"Add labels 'priority-high' and 'security' to issue #123"
"Set milestone v0.3.5 for issue #123"
# Via HTTP API - Update multiple properties
curl -X PATCH http://localhost:8081/github/issues/123 \
-H "Content-Type: application/json" \
-d '{
"title": "Critical: Authentication bug",
"body": "Updated description with more details...",
"labels": ["bug", "priority-high", "security"],
"milestone": 1,
"assignees": ["developer1", "developer2"]
}'
# Remove milestone
curl -X PATCH http://localhost:8081/github/issues/123 \
-H "Content-Type: application/json" \
-d '{"milestone": null}'# Via Claude Code
"List all open milestones"
"Show milestones sorted by completeness"
"List all milestones including closed ones"
# Via HTTP API
curl "http://localhost:8081/github/milestones?state=open&sort=due_on&direction=asc"
# Response example:
{
"milestones": [
{
"number": 1,
"title": "v0.3.5 - Adaptive Search Intelligence",
"description": "Smart query understanding and optimization",
"state": "open",
"due_on": "2025-07-01T00:00:00Z",
"open_issues": 15,
"closed_issues": 5,
"completion_percentage": 25
}
]
}# Via Claude Code
"Create milestone 'v0.3.5 - Adaptive Search Intelligence' due July 1st"
"Create milestone for Q2 2025 release"
# Via HTTP API
curl -X POST http://localhost:8081/github/milestones \
-H "Content-Type: application/json" \
-d '{
"title": "v0.3.5 - Adaptive Search Intelligence",
"description": "Implement smart query understanding and dynamic optimization",
"due_on": "2025-07-01"
}'# Via Claude Code
"Update milestone #1 due date to August 1st"
"Close milestone #1 as completed"
# Via HTTP API - Update
curl -X PATCH http://localhost:8081/github/milestones/1 \
-H "Content-Type: application/json" \
-d '{
"title": "v0.3.5 - Extended deadline",
"due_on": "2025-08-01"
}'
# Close milestone
curl -X DELETE http://localhost:8081/github/milestones/1The github_fetch_issues tool now supports advanced filtering:
# Via Claude Code
"Show all issues in milestone v0.3.5"
"List open issues in milestone #1"
# Via HTTP API - By milestone name
curl "http://localhost:8081/github/issues?milestone=v0.3.5&state=open"
# By milestone number
curl "http://localhost:8081/github/issues?milestone=1&state=open"# Via Claude Code
"Show issues assigned to developer1"
"List unassigned issues"
"Show issues assigned to me"
# Via HTTP API - Assigned to specific user
curl "http://localhost:8081/github/issues?assignee=developer1"
# Unassigned issues
curl "http://localhost:8081/github/issues?assignee=none"# Via Claude Code
"Show issues created after January 1st, 2025"
"List issues updated since last week"
# Via HTTP API - ISO date format
curl "http://localhost:8081/github/issues?since=2025-01-01T00:00:00Z"# Via Claude Code
"Show issues sorted by most recently updated"
"List issues sorted by comment count descending"
# Via HTTP API
curl "http://localhost:8081/github/issues?sort=updated&direction=desc"
curl "http://localhost:8081/github/issues?sort=comments&direction=desc"
# Sort options: created, updated, comments
# Direction: asc, desc# Via Claude Code
"Show unassigned bugs in milestone v0.3.5 sorted by priority"
# Via HTTP API - Complex query
curl "http://localhost:8081/github/issues?state=open&labels=bug&milestone=v0.3.5&assignee=none&sort=created&direction=desc"The github_search_issues tool supports full GitHub search syntax:
# Via Claude Code
"Search for issues: is:open milestone:v0.3.5 label:priority-high"
"Find all unassigned bugs created this month"
"Search for issues mentioning 'performance' in authentication module"
# Via HTTP API
curl -X POST http://localhost:8081/github/issues/search \
-H "Content-Type: application/json" \
-d '{
"query": "is:issue is:open milestone:v0.3.5 label:priority-high",
"sort": "created",
"order": "desc"
}'
# Common search patterns:
# - "is:issue is:open no:assignee" - Unassigned open issues
# - "is:issue label:bug created:>2025-01-01" - Recent bugs
# - "is:issue is:open milestone:\"v0.3.5\"" - Issues in specific milestone
# - "is:issue assignee:@me state:open" - My open issues# 1. Create milestone for release
"Create milestone 'v0.3.6 - Query Enhancement' due August 15th"
# 2. List all issues for planning
"Show all open enhancement issues sorted by priority"
# 3. Assign issues to milestone
"Update issue #201 with milestone v0.3.6"
"Update issue #202 with milestone v0.3.6"
"Update issue #203 with milestone v0.3.6"
# 4. Assign developers
"Assign issue #201 to developer1"
"Assign issue #202 to developer2"
"Assign issue #203 to developer1 and developer2"
# 5. Track progress
"Show all issues in milestone v0.3.6"
"List completed issues in milestone v0.3.6"
# 6. Close completed work
"Close issue #201 as completed with comment 'Implemented in PR #250'"
"Close issue #202 as completed"
# 7. Close milestone when done
"Close milestone #2 as completed"# 1. View unassigned work
"Show all unassigned open issues"
"List unassigned bugs with high priority"
# 2. Check developer workload
"Show issues assigned to developer1"
"List open issues assigned to developer2 in current milestone"
# 3. Balance assignments
"Unassign developer1 from issue #123"
"Assign issue #123 to developer2"
# 4. Bulk operations
"Search for issues: is:open assignee:developer1 label:low-priority"
"Update issue #456 removing developer1 from assignees"# 1. Find untriaged issues
"Search for issues: is:open no:label no:milestone"
# 2. Classify and prioritize
"Update issue #300 with labels 'bug', 'priority-high'"
"Set milestone v0.3.5 for issue #300"
"Assign issue #300 to developer1"
# 3. Handle duplicates
"Close issue #301 as duplicate with comment 'Duplicate of #300'"
# 4. Defer issues
"Close issue #302 as not_planned with comment 'Out of scope for current roadmap'"Tool: github_close_issue
HTTP: PATCH /github/issues/{id}/close
Parameters:
issue_number(required): Issue to closereason(optional): "completed", "not_planned", "duplicate" (default: "completed")comment(optional): Comment to add before closing
Tool: github_assign_issue
HTTP: POST /github/issues/{id}/assignees
Parameters:
issue_number(required): Issue numberassignees(required): List of usernamesoperation(optional): "add" or "remove" (default: "add")
Tool: github_update_issue
HTTP: PATCH /github/issues/{id}
Parameters:
issue_number(required): Issue to updatetitle(optional): New titlebody(optional): New descriptionstate(optional): "open" or "closed"labels(optional): List of labelsassignees(optional): List of assigneesmilestone(optional): Milestone number or null
Tool: github_search_issues
HTTP: POST /github/issues/search
Parameters:
query(required): GitHub search syntax querysort(optional): "comments", "created", "updated"order(optional): "asc" or "desc" (default: "desc")
Tools: github_list_milestones, github_create_milestone, github_update_milestone, github_close_milestone
HTTP: Various endpoints under /github/milestones
- Consistent Labeling: Use a standard label taxonomy (e.g., type/bug, priority/high)
- Milestone Planning: Create milestones before sprint/release planning
- Assignment Balance: Monitor workload across team members
- Regular Triage: Schedule regular issue triage sessions
- Clear Close Reasons: Always specify why issues are closed
- Automation: Use search queries to find issues needing attention
If you're upgrading to v0.3.4.post5, here's how to leverage the new features with your existing issues:
# 1. List your releases/versions that need milestones
"Show me all closed issues with label 'release'"
# 2. Create milestones for past releases (documentation purposes)
"Create milestone 'v0.3.0 - GitHub Integration' as already completed"
"Create milestone 'v0.3.4 - GitHub Projects V2'"
# 3. Create milestones for upcoming releases
"Create milestone 'v0.3.5 - Adaptive Search Intelligence' due July 15th"
"Create milestone 'v0.3.6 - Query Enhancement' due August 30th"# 1. Find issues for a specific release
"Search for issues: is:issue label:v0.3.5"
# 2. Update each issue with the appropriate milestone
"Update issue #100 with milestone v0.3.5"
"Update issue #101 with milestone v0.3.5"
"Update issue #102 with milestone v0.3.5"
# 3. Verify milestone assignment
"Show all issues in milestone v0.3.5"# 1. Create release dashboard project
"Create project 'Release Dashboard' from roadmap template"
# 2. Add all issues from current milestone
"Show all issues in milestone v0.3.5"
"Add issue #100 to project with smart field assignment"
# 3. Set up milestone-based filters in project
# (Use GitHub UI to create views filtered by milestone)# 1. Find all unassigned issues
"Show all unassigned open issues"
"Search for issues: is:open no:assignee no:milestone"
# 2. Triage and assign milestones
"Update issue #200 with milestone v0.3.6 and labels 'enhancement'"
"Assign issue #200 to developer1"
# 3. Defer non-priority items
"Close issue #201 as not_planned with comment 'Deferred to future release'"- Cause: Milestone name doesn't match exactly or doesn't exist
- Solution: List milestones first to verify exact names
"List all open milestones"
"Update issue #123 with milestone 'Exact Milestone Name'"- Cause: Too many operations in sequence
- Solution: Use search to filter first, then update in smaller batches
"Search for issues: is:open label:bug no:milestone"
# Update 5-10 at a time rather than all at once- Cause: Trying to assign users who don't have repository access
- Solution: Verify user has access before assigning
"List repository collaborators" # Use GitHub UI
"Assign issue #123 to valid-username"- Cause: Incorrect search syntax or filters
- Solution: Start with simple queries and add filters gradually
# Start simple
"Search for issues: is:issue is:open"
# Add filters one at a time
"Search for issues: is:issue is:open label:bug"
"Search for issues: is:issue is:open label:bug milestone:v0.3.5"The system automatically classifies issues into categories:
- Bug: Error reports, crashes, unexpected behavior
- Feature: New functionality requests
- Performance: Speed, memory, optimization issues
- Documentation: Docs, guides, examples
From issue text, the analyzer extracts:
- Error messages and stack traces
- Code snippets and references
- File paths and function names
- Feature requirements
- Technical keywords
The analyzer performs multiple search strategies:
- Code search for function/class references
- Error search for similar issues
- General search for contextual understanding
- Dependency analysis for related components
Results include confidence metrics:
- High (>80%): Strong matches found, likely similar issue resolved before
- Medium (50-80%): Related patterns identified, moderate confidence
- Low (<50%): Limited matches, requires manual investigation
The GitHub integration implements sophisticated token optimization that reduces token consumption by 70-85% while maintaining full analysis quality. This is achieved through multiple optimization strategies working together.
-
Query Deduplication & Limiting
- Generates up to 17 potential queries from issue content
- Deduplicates similar queries
- Limits to maximum 8 unique queries
- Reduces redundant searches by ~50%
-
Search Result Limiting
- Results per query: 10 β 5 (50% reduction)
- Max relevant files: 5 (prevents information overload)
- Content preview: 200 characters (focused excerpts)
-
Progressive Context
- Dynamically adjusts context level based on issue type:
- Bugs: Method-level detail (finest granularity)
- Features: File-level overview (broader context)
- Default: Class-level (balanced approach)
- Reduces token usage by ~50% through intelligent chunking
- Dynamically adjusts context level based on issue type:
-
Dependency Exclusion
include_dependencies: falsesaves ~20% tokens- Focuses on direct matches, not transitive dependencies
-
Summary Mode
response_verbosity: "summary"returns only key findings- Excludes raw search results from response
- Maintains full internal analysis quality
The issue analyzer follows a sophisticated multi-step process:
1. Extract Information (from issue title/body)
βββ Title β Primary query
βββ Errors (up to 3) β Error queries
βββ Functions (up to 3) β Function queries
βββ Classes (up to 3) β Class queries
βββ Features (up to 2) β Feature queries
βββ Keywords (up to 5) β Keyword queries
2. Query Optimization
βββ Deduplicate queries (remove similar)
βββ Limit to 8 unique queries
βββ Assign appropriate search type
3. Execute Searches
βββ Error/Function/Class β search_code
βββ Features β search_docs
βββ Keywords/Title β search_code (fallback to search_docs)
4. Apply Progressive Context
βββ Bug issues β Method-level detail
βββ Feature requests β File-level overview
βββ Other β Class-level balance
5. Generate Summary
βββ Relevant files (max 5)
βββ Code patterns found
βββ Confidence scoring
βββ Actionable recommendations
For a typical bug report:
- Old approach: ~90,000 tokens (10 queries Γ 10 results Γ 750 tokens Γ 1.2)
- New approach: ~15,000 tokens (8 queries Γ 5 results Γ 750 tokens Γ 0.5)
- Reduction: 83% β
All settings in server_config.json under github.issues.analysis:
{
"search_limit": 5, // Results per search
"context_expansion": true, // Include surrounding chunks
"include_dependencies": false, // Exclude dependency expansion
"response_verbosity": "summary", // Summary mode
"progressive_context": {
"enabled": true, // Enable progressive context
"default_level": "class", // Default granularity
"bug_level": "method", // Bug-specific level
"feature_level": "file" // Feature-specific level
}
}All destructive operations default to dry-run mode:
# Safe - shows what would be done
github_resolve_issue issue_number=123
# Explicit dry run
github_resolve_issue issue_number=123 dry_run=true
# Actual execution (requires explicit confirmation)
github_resolve_issue issue_number=123 dry_run=falseCertain file patterns are blocked from modification:
- Secrets and keys (
*.key,*.pem,*.env) - CI/CD workflows (
.github/workflows/**) - Security-sensitive directories (
secrets/**)
Built-in GitHub API rate limit handling:
- Automatic rate limit detection
- Intelligent request spacing
- Retry logic with exponential backoff
- Configurable rate limit buffer
All GitHub operations are logged for compliance:
- Repository access
- Issue analysis
- PR creation
- Workflow execution
# Test authentication
github_list_repositories
# Expected response for success:
{
"repositories": [...],
"count": 10,
"owner": "authenticated_user"
}
# Error response for auth failure:
{
"error": "Failed to list repositories: Bad credentials"
}- Cause: PyGithub/GitPython not installed
- Solution: Install dependencies:
pip install PyGithub GitPython
- Cause: Haven't switched to a repository
- Solution: Run
github_switch_repositoryfirst
- Cause: Invalid or expired token
- Solution: Check token permissions and expiration
- Cause: Too many API requests
- Solution: Wait for rate limit reset or increase buffer
Enable detailed logging:
export QDRANT_LOG_LEVEL=DEBUGThe GitHub integration provides 29 MCP tools with corresponding HTTP endpoints:
| MCP Tool | HTTP Endpoint | Purpose |
|---|---|---|
github_list_repositories |
GET /github/repositories |
List user/org repositories |
github_switch_repository |
POST /github/switch_repository |
Set repository context |
github_fetch_issues |
GET /github/issues |
Fetch repository issues (enhanced in v0.3.4.post5) |
github_get_issue |
GET /github/issues/{id} |
Get issue details |
github_create_issue |
POST /github/issues |
Create new issues |
github_add_comment |
POST /github/issues/{id}/comment |
Add comments to issues |
github_analyze_issue |
POST /github/issues/{id}/analyze |
RAG-powered analysis |
github_suggest_fix |
POST /github/issues/{id}/suggest_fix |
Generate fix suggestions |
github_create_pull_request |
POST /github/pull_requests |
Create pull requests |
github_resolve_issue |
POST /github/issues/{id}/resolve |
End-to-end resolution |
| MCP Tool | HTTP Endpoint | Purpose |
|---|---|---|
github_close_issue |
PATCH /github/issues/{id}/close |
Close issues with state reasons |
github_assign_issue |
POST /github/issues/{id}/assignees |
Assign/unassign users |
github_update_issue |
PATCH /github/issues/{id} |
Update any issue property |
github_search_issues |
POST /github/issues/search |
Advanced search with GitHub syntax |
github_list_milestones |
GET /github/milestones |
List repository milestones |
github_create_milestone |
POST /github/milestones |
Create milestones |
github_update_milestone |
PATCH /github/milestones/{number} |
Update milestone properties |
github_close_milestone |
DELETE /github/milestones/{number} |
Close milestones |
| MCP Tool | HTTP Endpoint | Purpose |
|---|---|---|
github_list_projects |
GET /github/projects |
List GitHub Projects V2 |
github_create_project |
POST /github/projects |
Create new projects |
github_get_project |
GET /github/projects/{number} |
Get project details |
github_add_project_item |
POST /github/projects/{id}/items |
Add issues/PRs to projects |
github_update_project_item |
PATCH /github/projects/{id}/items/{item_id} |
Update item fields |
github_create_project_field |
POST /github/projects/{id}/fields |
Create custom fields |
github_get_project_status |
GET /github/projects/{id}/status |
Get project metrics |
github_delete_project |
DELETE /github/projects/{id} |
Delete projects |
| MCP Tool | HTTP Endpoint | Purpose |
|---|---|---|
github_list_sub_issues |
POST /github/list_sub_issues |
List sub-issues |
github_add_sub_issue |
POST /github/add_sub_issue |
Add sub-issue relationship |
github_remove_sub_issue |
POST /github/remove_sub_issue |
Remove sub-issue |
github_create_sub_issue |
POST /github/create_sub_issue |
Create and link sub-issue |
github_reorder_sub_issues |
POST /github/reorder_sub_issues |
Reorder sub-issues |
github_add_sub_issues_to_project |
POST /github/add_sub_issues_to_project |
Bulk add to projects |
List repositories for a user/organization.
Parameters:
owner(optional): Repository owner, defaults to authenticated user
Returns:
repositories: List of repository informationcount: Number of repositoriesowner: Repository owner
Switch to a repository context.
Parameters:
owner(required): Repository ownerrepo(required): Repository name
Returns:
repository: Repository informationmessage: Success message
Fetch issues from current repository.
Parameters:
state(optional): Issue state (open, closed, all), default: "open"labels(optional): Filter by labelslimit(optional): Maximum number of issues
Returns:
issues: List of issue informationcount: Number of issuesrepository: Repository name
Get detailed issue information.
Parameters:
issue_number(required): Issue number
Returns:
issue: Detailed issue data including commentsrepository: Repository name
Create a new GitHub issue.
Parameters:
title(required): Issue titlebody(optional): Issue description/bodylabels(optional): List of label names to applyassignees(optional): List of usernames to assign
Returns:
issue: Created issue informationrepository: Repository namemessage: Success message
Add a comment to an existing GitHub issue.
Parameters:
issue_number(required): Issue number to comment onbody(required): Comment body text (supports markdown)
Returns:
comment: Comment information including ID and URLrepository: Repository namemessage: Success message
Perform RAG-powered issue analysis.
Parameters:
issue_number(required): Issue number
Returns:
analysis: Complete analysis resultsworkflow_status: Analysis workflow statusrecommendations: Action recommendations
Generate fix suggestions for an issue.
Parameters:
issue_number(required): Issue number
Returns:
suggestions: Fix suggestions and code modificationsfeasibility: Implementation feasibility assessmentconfidence_level: Suggestion confidence
Complete issue resolution workflow.
Parameters:
issue_number(required): Issue numberdry_run(optional): Dry run mode, default: true
Returns:
workflow_status: Resolution workflow statussuitability: Auto-resolution suitabilitypr_preview(dry run): Preview of what would be created
Create a pull request.
Parameters:
title(required): PR titlebody(required): PR descriptionhead(required): Head branchbase(optional): Base branch, default: "main"files(optional): File references
Returns:
pull_request: Created PR informationmessage: Success message
- Index your repository before issue analysis for better results
- Use descriptive issue titles for better classification
- Include code snippets in issue descriptions for better analysis
- Tag issues appropriately for filtering
- Start with analysis before generating fixes
- Use dry-run mode to review suggestions
- Test fixes locally before creating PRs
- Review safety warnings carefully
- Use least-privilege tokens with minimal required scopes
- Rotate tokens regularly for security
- Monitor audit logs for unusual activity
- Keep private keys secure for GitHub Apps
- Limit search results to avoid token limits
- Use specific queries for better relevance
- Enable context expansion for comprehensive analysis
- Monitor rate limits to avoid throttling
Create and test issues for development:
# Via Claude Code (MCP)
"Create a test issue with title 'Testing GitHub integration' and labels 'test'"
"Switch to repository ancoleman/qdrant-rag-mcp"
"Analyze issue #1 to test RAG search functionality"
# Via HTTP API
curl -X POST http://localhost:8081/github/issues \
-H "Content-Type: application/json" \
-d '{
"title": "Test: Performance issue in search function",
"body": "The search function is slow when processing large datasets...",
"labels": ["performance", "test"]
}'Test all 9 GitHub MCP tools systematically:
# 1. Authentication and setup
"Check GitHub health status"
"List my repositories"
# 2. Repository context
"Switch to repository owner/repo-name"
# 3. Issue operations
"Show me open issues"
"Get details for issue #123"
"Create a test issue with labels 'bug,test'"
"Add a comment to issue #123 saying 'Thanks for reporting this!'"
# 4. Analysis workflow
"Analyze issue #123 using RAG search"
"Generate fix suggestions for issue #123"
# 5. Resolution workflow
"Test resolving issue #123 in dry-run mode"
"Create a pull request to fix issue #123"Complete HTTP endpoint testing workflow:
# Start HTTP server
export $(grep -v '^#' .env | xargs)
python src/http_server.py
# Test authentication endpoints
curl http://localhost:8081/github/health
curl http://localhost:8081/github/repositories
# Test issue lifecycle
curl -X POST http://localhost:8081/github/switch_repository \
-H "Content-Type: application/json" \
-d '{"owner": "myorg", "repo": "myproject"}'
curl -X POST http://localhost:8081/github/issues \
-H "Content-Type: application/json" \
-d '{"title": "Test issue", "body": "Testing HTTP API"}'
curl http://localhost:8081/github/issues/1
curl -X POST http://localhost:8081/github/issues/1/analyze
curl -X POST http://localhost:8081/github/issues/1/suggest_fixUse the testing script for comprehensive validation:
# Run all tests
./tests/integration/github/test_github_http_api.sh
# Test authentication only
./tests/integration/github/test_github_http_api.sh --auth-only
# Test issue operations only
./tests/integration/github/test_github_http_api.sh --issues-only
# Test analysis workflow only
./tests/integration/github/test_github_http_api.sh --analysis-onlyThe GitHub tools integrate seamlessly with Claude Code's natural language interface:
# Issue analysis and resolution
"Analyze GitHub issue #123 and suggest a fix"
"Create a PR to resolve the authentication bug in issue #456"
"Show me all open bugs in the authentication module"
# Repository and issue management
"Switch to my project repository and show recent issues"
"Create a test issue for the login bug and analyze it"
"List all performance-related issues and analyze the most critical one"
"Add a comment to issue #123 with the analysis results"
# Workflow automation
"Analyze issue #789, generate fixes, and create a PR in dry-run mode"
"Show me the health status of GitHub integration"
"Comment on issue #456 saying the fix has been deployed to staging"
GitHub analysis leverages all existing RAG capabilities:
- Code search with dependency analysis
- Documentation search for related guides
- Context expansion for comprehensive understanding
- Enhanced ranking for better relevance
Repository switching can trigger automatic indexing:
{
"github": {
"repository": {
"auto_index_on_switch": true
}
}
}# Fetch all open issues
github_fetch_issues state="open"
# Analyze each for classification and priority
for issue in issues:
github_analyze_issue issue_number=issue.number# Analyze multiple related issues
github_analyze_issue issue_number=123 # Main bug
github_analyze_issue issue_number=124 # Related feature
github_analyze_issue issue_number=125 # Performance issue# Switch between related repositories
github_switch_repository owner="myorg" repo="frontend"
github_analyze_issue issue_number=123
github_switch_repository owner="myorg" repo="backend"
github_analyze_issue issue_number=456Check GitHub integration health:
health_check
# Response includes GitHub status:
{
"github": {
"status": "healthy",
"authenticated_user": "username",
"rate_limit": {
"remaining": 4500,
"limit": 5000
}
}
}Monitor GitHub operations via audit logs:
# View GitHub operation logs
./scripts/qdrant-logs --operation github_analyze_issue
./scripts/qdrant-logs --operation github_create_pull_requestPlanned improvements for future versions:
- Automated PR merging with confidence thresholds
- Multi-repository analysis for complex issues
- AI-powered code generation for fixes
- Integration with CI/CD for automated testing
- Issue prediction based on code changes
- Custom workflow templates for different issue types
For GitHub integration issues:
- Check the troubleshooting section
- Review GitHub API documentation
- File an issue with detailed error logs
- Include authentication method and configuration (sanitized)
- GitHub Workflow Examples - Real-world usage patterns and issue remediation workflows
- Complete Setup & Usage Guide
- Enhanced RAG Guide
- MCP Scope Configuration
- Development Workflow Guide