A high-performance tool to analyze GitHub Pull Requests by author, generating comprehensive summaries with LLM-powered insights.
- Parallel batch processing for faster PR analysis
- Safe git operations with mutex-based locking
- Full PR diffs with automatic fallback for large PRs
- Auto-numbered output files
- Robust error handling
- LLM-powered analysis using Google Gemini
- Retry mechanism for failed analyses
- Bun runtime
- GitHub CLI (authenticated)
- Git
- Google Gemini API key
bun install
gh auth login
cp .env.example .env
# Add your GEMINI_API_KEY to .envbun run src/analyzePR.ts --repo OWNER/REPO --author USERNAME --limit 50Options:
--repo(required): Repository inOWNER/REPOformat--author(required): GitHub username--limit(optional): Number of PRs to analyze (default: 10)--batch-size(optional): Parallel processing batch size (default: 20)
Example:
bun run src/analyzePR.ts --repo OWNER/REPO --author USERNAME --limit 100bun run src/llmRunner.ts ./cache/report.jsonAnalyzes PRs from cache and generates comprehensive reports.
bun run src/llmRunner.ts retry ./reports/1_pr-analysis-report.json ./cache/report.jsonPR Reports: cache/{N}_{author}_report.json
- Contains PR metadata and diff file references
Diff Files: cache/diff/{N}_{repo}_pr{number}_diff.patch
- Complete PR changes in git patch format
Analysis Reports: reports/{N}_pr-analysis-report.json
- LLM-generated insights and summaries
Edit src/prompt.ts to customize LLM analysis prompts.