π Track GitHub reviews you received - The missing GitHub feature!
# Option 1: Global installation
npm install -g get-gh-reviews
get-gh-reviews reviews -u YOUR_USERNAME
# Option 2: No installation needed (npx)
npx get-gh-reviews reviews -u YOUR_USERNAME
# Generate markdown report
npx get-gh-reviews reviews -u YOUR_USERNAME --markdown report.md
Ever wondered who's been reviewing your code most frequently? Or what feedback patterns you're getting?
get-gh-reviews
is a powerful CLI tool that fills GitHub's gap by tracking all code reviews you've received across your repositories. Generate beautiful reports, discover review patterns, and level up your development workflow!
GitHub shows you "reviews requested" and lets you see "reviews given", but there's no way to see all reviews you've received. This tool solves that problem with:
- π― Complete review visibility - See ALL reviews across ALL your PRs
- π Smart analytics - Discover who reviews you most, review patterns, and more
- π Beautiful reports - Generate shareable Markdown reports with table of contents
- π Advanced filtering - By time, organization, repository, and review status
- β‘ Lightning fast - Efficient GitHub API usage with smart caching
-
Install globally:
npm install -g get-gh-reviews
-
Get your GitHub token:
- Visit GitHub Settings > Tokens
- Create a token with
repo
orpublic_repo
scope
-
Run the command:
get-gh-reviews reviews -u YOUR_GITHUB_USERNAME -t YOUR_TOKEN
npx get-gh-reviews reviews -u YOUR_GITHUB_USERNAME -t YOUR_TOKEN
π‘ Tip: If you get "command not found" error, use npx
- it always works!
That's it! π
get-gh-reviews
addresses the GitHub feature gap where there's no consolidated view of all reviews you've received on your pull requests. See who's been reviewing your code, what feedback you're getting, and track your development patterns.
Feature | Description | Example |
---|---|---|
π― Review Tracking | See all reviews received on your PRs | get-gh-reviews reviews -u username |
π Smart Analytics | Who reviews you most? Which repos get most feedback? | get-gh-reviews stats -u username |
π Beautiful Reports | Generate Markdown reports with table of contents | --markdown monthly-report.md |
π Advanced Filtering | Filter by time, org, repo, or review state | -d 30 -o mycompany -s approved |
πΎ Multiple Formats | Human-readable, JSON, or Markdown output | --json or --markdown |
π’ Team Ready | Perfect for organizations and team workflows | -o your-company |
π± Code Context | See actual code being reviewed with syntax highlighting | Automatic in Markdown reports |
β‘ Fast & Reliable | Efficient API usage with smart error handling | Works with large repositories |
- π Table of Contents - Navigate large reports easily with clickable TOC
- π¨ Syntax Highlighting - Code context with proper language detection
- π Smart Linking - Jump between TOC and detailed sections
npm install -g get-gh-reviews
After installation, you can run the command directly:
get-gh-reviews reviews -u your-username --markdown my-reviews.md
If you don't want to install globally or have permission issues:
npx get-gh-reviews reviews -u your-username --markdown my-reviews.md
If get-gh-reviews
command is not found after global installation:
-
Check if it's installed globally:
npm list -g get-gh-reviews
-
Find npm's global bin directory:
npm bin -g
-
Add to your PATH (if needed):
# Add this to your ~/.bashrc or ~/.zshrc export PATH="$(npm bin -g):$PATH"
-
Alternative: Use npx (always works):
npx get-gh-reviews --help
For permission issues on macOS/Linux:
# Option 1: Use npx (recommended)
npx get-gh-reviews reviews -u username
# Option 2: Fix npm permissions
sudo npm install -g get-gh-reviews
npm install get-gh-reviews
get-gh-reviews reviews -u your-username -t your_github_token
When you first run the tool, it automatically creates a config file at ~/.get-gh-reviews.env
. Just edit it:
# The tool will create this file automatically
nano ~/.get-gh-reviews.env
# Then replace 'your_token_here' with your actual token
GITHUB_TOKEN=ghp_your_actual_token_here
export GITHUB_TOKEN="your_token_here"
get-gh-reviews reviews -u your-username
- Go to GitHub Settings > Tokens
- Click "Generate new token" β "Generate new token (classic)"
- Select scopes:
- β
repo
(for private repositories) - β
public_repo
(for public repositories only)
- β
- Copy the token (starts with
ghp_
)
# See all reviews you've received
get-gh-reviews reviews -u your-username
# Get review statistics (who reviews you most, etc.)
get-gh-reviews stats -u your-username
# See reviews from last 30 days only
get-gh-reviews reviews -u your-username -d 30
# Export reviews to a Markdown report
get-gh-reviews reviews -u your-username --markdown my-reviews.md
# Filter reviews from a specific organization
get-gh-reviews reviews -u your-username -o your-company
# Team statistics for the last week
get-gh-reviews stats -u your-username -o your-company -d 7
# Human-readable output (default)
get-gh-reviews reviews -u your-username
# JSON format (for scripts/automation)
get-gh-reviews reviews -u your-username --json
# Generate a nice Markdown report
get-gh-reviews reviews -u your-username --markdown monthly-review-report
# Only show open PRs
get-gh-reviews reviews -u your-username -s open
# Limit results (useful for quick checks)
get-gh-reviews reviews -u your-username -l 10
# Combine filters for precise results
get-gh-reviews reviews -u your-username -o mycompany -d 7 -s open
Option | Description | Default |
---|---|---|
-u, --username |
GitHub username (required) | - |
-t, --token |
GitHub token (or use GITHUB_TOKEN env var) | - |
-o, --org |
Filter by organization | - |
-s, --state |
PR state filter (open, closed, all) | all |
-p, --page |
Page number | 1 |
-l, --limit |
Results per page | 30 |
-d, --days |
Filter reviews from last N days | - |
--json |
Output as JSON | false |
--markdown |
Output as Markdown file | - |
const { GitHubReviewsTracker } = require('get-gh-reviews');
const tracker = new GitHubReviewsTracker('your_github_token');
import { GitHubReviewsTracker, Review, ReviewStats } from 'get-gh-reviews';
const tracker = new GitHubReviewsTracker('your_github_token');
// Get reviews received
async function getMyReviews() {
try {
const result = await tracker.getReceivedReviews('your-username', {
state: 'all',
per_page: 30,
org: 'your-org', // optional
timeframe: 7 // last 7 days, optional
});
console.log(`Found ${result.total_count} reviews`);
result.reviews.forEach(review => {
console.log(`${review.reviewer}: ${review.state} on ${review.pr_title}`);
});
} catch (error) {
console.error('Error:', error.message);
}
}
// Get review statistics
async function getMyStats() {
try {
const stats = await tracker.getReviewStats('your-username', {
org: 'your-org', // optional
timeframe: 30 // last 30 days, optional
});
console.log('Review Stats:', stats);
} catch (error) {
console.error('Error:', error.message);
}
}
// Generate Markdown report
async function generateReport() {
try {
const result = await tracker.getReceivedReviews('your-username', {
timeframe: 30
});
const markdownContent = tracker.generateMarkdownReport(result.reviews, 'your-username', {
title: 'Monthly Review Report',
includeStats: true
});
const fs = require('fs');
fs.writeFileSync('my-reviews.md', markdownContent, 'utf8');
console.log('Markdown report generated: my-reviews.md');
} catch (error) {
console.error('Error:', error.message);
}
}
getMyReviews();
getMyStats();
generateReport();
The generated Markdown reports now include a table of contents for easy navigation:
# π Received Reviews Report
**Generated:** 2025/9/4
**User:** your-username
**Total Reviews:** 15 reviews
## π Statistics
- β
Approved: 8 reviews
- π Changes Requested: 5 reviews
- π¬ Comments Only: 2 reviews
## π Table of Contents
- [Fix database migration issues](#pr-myorg-myrepo-123) - **3 reviews** (myorg/myrepo#123)
- [Update auth system](#pr-myorg-myrepo-124) - **2 reviews** (myorg/myrepo#124)
- [Add user profiles](#pr-myorg-myrepo-125) - **3 reviews** (myorg/myrepo#125)
## π Detailed Reviews
### <a id="pr-myorg-myrepo-123"></a>[Fix database migration issues](https://github.com/myorg/myrepo/pull/123) (#123)
#### π CHANGES_REQUESTED by [@senior-dev](https://github.com/senior-dev)
**Date:** 2025/8/26 8:14:42
**Code Comment:**
**π database_schema.sql:96**
```sql
`id` CHAR(26) NOT NULL,
`user_id` CHAR(26) NOT NULL,
`title` VARCHAR(255) NOT NULL,
π¬ Consider adding indexes for better performance
### π― Key Features of Reports:
- **π Clickable Table of Contents** - Jump directly to any PR section
- **π¨ Syntax Highlighted Code** - See actual code being reviewed
- **π GitHub Integration** - Direct links to PRs, comments, and reviews
- **π Smart Statistics** - Review counts and patterns at a glance
- **π± Mobile Friendly** - Beautiful formatting on any device
## API Response Format
### Reviews Response
```json
{
"reviews": [
{
"pr_title": "Add new feature X",
"pr_number": 123,
"pr_url": "https://github.com/owner/repo/pull/123",
"repository": "owner/repo",
"reviewer": "reviewer-username",
"reviewer_avatar": "https://avatars.githubusercontent.com/u/123456?v=4",
"state": "APPROVED",
"submitted_at": "2025-01-15T10:30:00Z",
"body": "Looks good to me!",
"review_url": "https://github.com/owner/repo/pull/123#pullrequestreview-123456"
}
],
"total_count": 42,
"page": 1,
"per_page": 30
}
{
"total_reviews": 42,
"by_state": {
"approved": 25,
"changes_requested": 12,
"commented": 5
},
"by_reviewer": {
"reviewer1": 15,
"reviewer2": 10,
"reviewer3": 8
},
"by_repository": {
"org/repo1": 20,
"org/repo2": 15,
"org/repo3": 7
}
}
APPROVED
β - Review approved the pull requestCHANGES_REQUESTED
π - Review requested changesCOMMENTED
π¬ - Review left comments without explicit approvalDISMISSED
β - Review was dismissed
- Track your growth - See feedback patterns and improve code quality
- Build relationships - Identify who reviews you most and engage better
- Career development - Document review history for performance reviews
- Learning insights - Understand what areas you get most feedback on
- Team insights - Analyze review distribution across team members
- Process improvement - Identify review bottlenecks and patterns
- Knowledge sharing - Find opportunities for mentoring and learning
- Performance tracking - Quantify collaboration and feedback quality
- Engineering metrics - Track review activity across all repositories
- Workflow optimization - Identify and eliminate review process bottlenecks
- Quality assurance - Monitor review coverage and engagement levels
- Team health - Ensure balanced review distribution and prevent burnout
- Community engagement - Track contributor feedback and involvement
- Project health - Monitor review activity across all contributions
- Recognition - Identify top reviewers for community acknowledgment
This package is written in TypeScript. For development:
# Run TypeScript CLI directly
npm run dev -- reviews -u username
# Build the project
npm run build
# Run example
npm run example
- Check your username spelling (case-sensitive)
- Verify the user exists: Visit
https://github.com/your-username
- Check token permissions: Make sure your token has
repo
orpublic_repo
scope
- Token format: Should start with
ghp_
(Personal Access Token) - Token expiration: Check if your token hasn't expired
- Scope permissions: Need
repo
for private repos,public_repo
for public repos
- User has no PRs: The username might not have any pull requests
- Private repositories: Need
repo
scope in your token to access private repos - Time filter too restrictive: Try removing
-d
option or increasing the days
# Test GitHub API connectivity
curl -H "Authorization: token YOUR_TOKEN" https://api.github.com/user
- Verify your GitHub username:
https://github.com/YOUR_USERNAME
- Test your token: Try the curl command above
- Check token scopes: Go to GitHub Settings > Tokens and verify permissions
Open an issue at: https://github.com/yourusername/get-gh-reviews/issues
- Node.js 14.0.0 or higher
- GitHub Personal Access Token with appropriate scopes
- Network access to GitHub API (https://api.github.com)
This tool respects GitHub's API rate limits:
- 5,000 requests/hour for authenticated requests
- Built-in retry logic and rate limit handling
- For large organizations, consider running during off-peak hours
- π Review notifications - Get notified when you receive new reviews
- π Trend analysis - Track review patterns over time with charts
- π¨ Custom themes - Personalize your Markdown reports
- π€ AI insights - Smart analysis of feedback patterns
- π§ Email reports - Automated weekly/monthly review summaries
- π CI/CD integration - Automate report generation in workflows
We love contributions! Here's how you can help:
- π Report bugs - Found an issue? Open a bug report
- π‘ Feature requests - Have an idea? Suggest a feature
- π¨ Code contributions:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Special thanks to everyone who has contributed to making this tool better!
ISC License - see the LICENSE file for details.
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: For enterprise support inquiries
If this tool helped you track your reviews and improve your workflow:
- β Star this repository
- π¦ Share on Twitter/LinkedIn
- π Write a blog post about your experience
- π€ Contribute code, documentation, or ideas
Made with β€οΈ for the developer community
This tool addresses the missing GitHub feature of tracking reviews received - helping developers worldwide understand their code review patterns and build better relationships with their teams.