GitHub Integration Guide
Guide for using Wave's GitHub integration to automate issue management workflows.
Quick Start
1. Set up authentication
bash
export GITHUB_TOKEN="ghp_your_personal_access_token"2. Run issue enhancement workflow
bash
wave run github-issue-enhancer --input '{"repo": "owner/repo"}'This will:
- Scan all open issues in the repository
- Analyze each issue for quality
- Identify poorly described issues (score < 70)
- Generate enhancement recommendations
- Apply enhancements to issues
- Verify changes were applied
Setup
Prerequisites
- GitHub Account with access to target repositories
- GitHub Personal Access Token with permissions:
repo(full repository access)write:discussion(for issue comments)
- GitHub CLI (
gh) installed and authenticated
Create GitHub Token
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token (classic)"
- Select scopes:
repo- Full control of private repositorieswrite:discussion- Write access to discussions
- Generate token and save it securely
Configure Wave
Add GitHub token to your environment:
bash
# In ~/.bashrc or ~/.zshrc
export GITHUB_TOKEN="ghp_xxxxxxxxxxxxx"Verify setup:
bash
# Test GitHub CLI authentication
gh auth statusIssue Enhancement Workflow
Pipeline: github-issue-enhancer.yaml
Purpose: Automatically improve poorly described GitHub issues
Steps:
scan-issues (github-analyst)
- Lists all open issues
- Analyzes quality (0-100 score)
- Identifies issues scoring below threshold
plan-enhancements (github-analyst)
- Reviews poor-quality issues
- Creates specific enhancement plans
- Suggests improved titles and body templates
- Recommends labels
apply-enhancements (github-enhancer)
- Executes enhancement plans via gh CLI
- Updates issue titles and bodies
- Adds labels
verify-enhancements (github-analyst)
- Confirms enhancements were applied
- Reports on success/failures
Usage:
bash
# Enhance issues in a repository
wave run github-issue-enhancer --input '{"repo": "owner/repo"}'
# With custom quality threshold
wave run github-issue-enhancer --input '{"repo": "owner/repo", "threshold": 80}'Personas
github-analyst
Role: Read-only analysis of GitHub issues
Capabilities:
- List and retrieve issues via gh CLI
- Analyze issue quality
- Score completeness (0-100)
- Identify problems
- Generate recommendations
Use when: You need objective analysis without modifications
github-enhancer
Role: Apply improvements to GitHub issues
Capabilities:
- Update issue titles via gh CLI
- Enhance descriptions
- Add labels
Use when: You need to apply enhancements to issues
Best Practices
Issue Enhancement
- Start with dry runs: Use
--stop-afterto review plans before applying - Be conservative: Start with low threshold (50-60) to target worst issues
- Review comments: Check the enhancement comments are respectful
- Preserve content: Always maintain original author's content
- Batch carefully: Process repositories in small batches to avoid rate limits
Rate Limiting
- Monitor usage: Check rate limit status with
gh api rate_limit - Add delays: Sleep between operations when batch processing
- Use authenticated requests: Always set GITHUB_TOKEN (5000/hr vs 60/hr)
Security
- Protect tokens: Never commit tokens to git
- Use environment variables: Store GITHUB_TOKEN in env
- Minimal permissions: Use fine-grained PATs with minimal scope
- Rotate regularly: Refresh tokens every 90 days
Troubleshooting
Rate Limit Exceeded
Error:
Error: GitHub API rate limit exceededSolution:
- Wait for rate limit reset
- Verify GITHUB_TOKEN is set (authenticated = 5000/hr)
- Add delays between operations
Authentication Failed
Error:
Error: gh: authentication requiredSolution:
- Run
gh auth login - Verify token is correct:
gh auth status - Check token has required scopes
Issue Not Found
Error:
Error: issue not foundSolution:
- Verify repository owner/name are correct
- Check you have access to the repository
- Confirm issue number exists