Package Exports
- get-gh-reviews
- get-gh-reviews/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-gh-reviews) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
π get-gh-reviews
https://github.com/user-attachments/assets/75d68f2d-7bf3-4468-b97b-4f41066664e5
π Track GitHub reviews you received - The missing GitHub feature!
π¦ Installation & Usage
# 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.mdEver 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!
β Why use this?
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 enhanced table of contents
- π Advanced filtering - By time, organization, repository, and review status
- β‘ Lightning fast - Efficient GitHub API usage with smart caching
- π± Cute loading animations - Enjoy adorable characters while processing
- π Timeline view - GitHub-style chronological display of reviews and replies
π Quick Start
Option A: Global Installation
Install globally:
npm install -g get-gh-reviews
Get your GitHub token:
- Visit GitHub Settings > Tokens
- Create a token with
repoorpublic_reposcope
Run the command:
get-gh-reviews reviews -u YOUR_GITHUB_USERNAME -t YOUR_TOKEN
Option B: No Installation (using npx)
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!
π Security & Token Handling
This project follows safe practices for handling credentials and install-time behavior. Key points:
- Do NOT store long-lived tokens in repository files. Prefer environment variables (GITHUB_TOKEN) or your CI secret store.
- The CLI will create
~/.get-gh-reviews.envonly on first run and attempts to set restrictive file permissions (0600). Storing tokens in this file is optional and not recommended for shared machines. - This package does not run
postinstallor other automatic install-time scripts. If you are operating in a high-security environment, consider installing withnpm_config_ignore_scripts=1.
If you discover a security issue, please open a GitHub Issue in this repository (preferable) and follow the reporting guidance in .github/SECURITY.md.
Local secret scan (Gitleaks)
You can run a local secret scan using gitleaks. This repository includes a .gitleaks.toml with common patterns.
Install and run locally:
# install (Linux/macOS)
brew install gitleaks || go install github.com/zricethezav/gitleaks/v8@latest
# run scan
gitleaks detect --source . --config .gitleaks.toml --report-path gitleaks-report.jsonA GitHub Action (.github/workflows/gitleaks.yml) runs gitleaks on PRs and pushes to main.
That's it! π
Overview
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.
β¨ Features
| 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 |
π Latest Features (v1.5.0)
- π 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
π¦ Installation
Method 1: Global Installation (Recommended)
npm install -g get-gh-reviewsAfter installation, you can run the command directly:
get-gh-reviews reviews -u your-username --markdown my-reviews.mdMethod 2: Using npx (No installation required)
If you don't want to install globally or have permission issues:
npx get-gh-reviews reviews -u your-username --markdown my-reviews.mdTroubleshooting Installation Issues
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-reviewsLocal Installation (as dependency)
npm install get-gh-reviewsSetup Options
Option 1: Use Token Directly (Recommended for first-time users)
get-gh-reviews reviews -u your-username -t your_github_tokenOption 2: Save Token in Config File (Convenient for regular use)
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_hereOption 3: Environment Variable
export GITHUB_TOKEN="your_token_here"
get-gh-reviews reviews -u your-usernameGetting Your GitHub Token
- 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_)
Common Usage Examples
π Basic Commands
# 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π’ For Teams & Organizations
# 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π Different Output Formats
# 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β‘ Pro Tips
# 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 openCLI Options
| 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 | - |
Programmatic Usage
JavaScript/Node.js
const { GitHubReviewsTracker } = require("get-gh-reviews");
const tracker = new GitHubReviewsTracker("your_github_token");TypeScript
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();π Report Preview
The generated Markdown reports now include a table of contents for easy navigation:
Sample Report Structure
# π 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
}Statistics Response
{
"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
}
}Review States
APPROVEDβ - Review approved the pull requestCHANGES_REQUESTEDπ - Review requested changesCOMMENTEDπ¬ - Review left comments without explicit approvalDISMISSEDβ - Review was dismissed
π― Who Should Use This?
π¨βπ» Individual Developers
- 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 Leaders & Engineering Managers
- 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
π’ Organizations & Enterprises
- 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
π Open Source Maintainers
- Community engagement - Track contributor feedback and involvement
- Project health - Monitor review activity across all contributions
- Recognition - Identify top reviewers for community acknowledgment
Development
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 exampleTroubleshooting
β "User/Organization not found" Error
- Check your username spelling (case-sensitive)
- Verify the user exists: Visit
https://github.com/your-username - Check token permissions: Make sure your token has
repoorpublic_reposcope
π Authentication Issues
- Token format: Should start with
ghp_(Personal Access Token) - Token expiration: Check if your token hasn't expired
- Scope permissions: Need
repofor private repos,public_repofor public repos
π "No reviews found"
- User has no PRs: The username might not have any pull requests
- Private repositories: Need
reposcope in your token to access private repos - Time filter too restrictive: Try removing
-doption or increasing the days
π Network Issues
# Test GitHub API connectivity
curl -H "Authorization: token YOUR_TOKEN" https://api.github.com/userπ‘ Still having issues?
- 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
π Get Help
Open an issue at: https://github.com/yourusername/get-gh-reviews/issues
Requirements
- Node.js 14.0.0 or higher
- GitHub Personal Access Token with appropriate scopes
- Network access to GitHub API (https://api.github.com)
Rate Limiting
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
π Roadmap & Future Features
- π 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
π€ Contributing
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
π Contributors
Special thanks to everyone who has contributed to making this tool better!
π License
ISC License - see the LICENSE file for details.
π Support & Community
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: For enterprise support inquiries
π Show Your Support
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
π Changelog
v1.7.5 (2025-01-15)
π§ Progress Bar Stability Fix
Bug Fixes:
- π Fixed Progress Bar Position - Progress bar no longer shifts horizontally due to variable dot lengths
- π― Stable Loading Animation - Loading text now uses fixed-width formatting for consistent display
- π Aligned Progress Display - Percentage values are now right-aligned for better readability
Improvements:
- β¨ Smoother User Experience - Progress bar stays in a consistent position during loading
- π¨ Better Visual Alignment - All progress elements maintain proper spacing
v1.7.4 (2025-01-15)
π International Support Enhancement
New Features:
- π Bilingual Display - All Japanese terms now show English equivalents (e.g., "APPROVED (ζΏθͺζΈγΏ)")
- π Bilingual Section Headers - All major sections display both English and Japanese
- π Bilingual Links - Link texts now include both language versions
- π International Statistics - Status displays are now globally accessible
Improvements:
- π Global Accessibility - Non-Japanese speakers can now understand all report sections
- π Clear Status Labels - Review states clearly show both English and Japanese terms
- π― Professional International Reports - Reports are now suitable for international teams
v1.7.3 (2025-01-15)
π Progress Tracking Enhancement
New Features:
- π Progress Bar - Real-time visual progress bar showing review fetching progress
- π Percentage Display - Shows completion percentage alongside the progress bar
- π’ Current/Total Counter - Displays current item vs total items being processed
- π¨ Colored Progress Bar - Beautiful cyan-colored progress visualization
Improvements:
- β‘ Better User Feedback - Users can see exactly how much work remains
- π Visual Progress Tracking - Progress bar updates in real-time as PRs are processed
- π― Professional Loading Experience - Combines ASCII art, tips, and progress tracking
v1.7.2 (2025-01-15)
π¨ Enhanced Visual Experience
New Features:
- π₯οΈ ASCII Art Loading Screen - Beautiful GET-GH-REVIEWS ASCII art logo displayed during processing
- π‘ Helpful Tips Display - Shows useful getting started tips while loading reviews
- π¨ Colorful Terminal Output - Enhanced visual experience with colored text and clear formatting
- πΊ Clean Screen Management - Auto-clears screen for better presentation
Improvements:
- π Better User Experience - Clear visual feedback with professional ASCII branding
- π Informative Loading - Users see helpful tips instead of just waiting
- π― Professional Appearance - Tool now has distinctive visual identity
v1.7.1 (2025-01-15)
π§ Bug Fixes & Quality Improvements
Bug Fixes:
- π Fixed Duplicate Reviews - Eliminated duplicate review entries in both table of contents and detail sections
- π Improved Review Display - Review comments now show actual content (first 30 characters) instead of generic "COMMENTEDγ¬γγ₯γΌ" text
- π Enhanced PR Grouping - Reviews are now properly grouped by PR in the table of contents with unique identification
- π» Restored Code Diff Display - Code diff viewing functionality was accidentally removed during simplification and has been restored
Improvements:
- π― Better Content Preview - Table of contents now shows meaningful review content snippets for easier navigation
- π More Accurate Review Counts - Duplicate removal ensures accurate review counts per PR
- π Improved Navigation - Enhanced anchor links between table of contents and detailed sections
v1.7.0 (2025-01-15)
π Major Update - Enhanced User Experience!
New Features:
- π± Cute Loading Animations - Added adorable characters (meow, paws, magic, sparkle) during processing
- π Timeline View - GitHub-style chronological display mixing reviews, code comments, and replies
- π Enhanced Table of Contents - Separate sections for PRs and individual review comments with clickable navigation
- π International Support - Loading messages now use English-friendly cute characters
Improvements:
- β‘ Better Progress Tracking - Real-time display of which PR is being processed (e.g., "Processing 3/10: PR Title")
- π Detailed Status Updates - Step-by-step progress from repository discovery to completion
- π― More Accurate Timeline - Reviews and replies now display in exact chronological order like GitHub
Bug Fixes:
- π§ Fixed timeline ordering issues
- π οΈ Improved error handling during data collection
Previous Versions
- v1.6.2 - Security improvements and error handling
- v1.6.0 - Added support for private repositories
- v1.5.0 - Markdown report generation
- v1.4.0 - Statistics and filtering features
Made with β€οΈ for the developer community
This tool addresses the missing GitHub feature of tracking reviews received β helping developers understand their review patterns and build better relationships with their teams. faa591e87417c674aeed781b4c420d42145903d9