A comprehensive bash script to retrieve and analyze your GitHub activities for performance evaluation purposes.
TIPS: Use the generated raw data as input to your favorite LLM to write a good basis for performance evaluation talks.
The script gathers the following information for a specified time period:
- Repository Activity: All repositories you've been active in, with language breakdown and statistics
- Commits: All commits you've authored across all repositories
- Pull Requests: PRs you've created, with status and links
- Issues: Issues you've opened, with status and links
- Activity Events: Recent GitHub activity (pushes, releases, etc.)
- Statistics: Summary statistics with language breakdown and top repositories
curl(usually pre-installed on macOS)jq- Install with:brew install jq(on Mac)
./github-activity-summary.sh <username> [since_date] [github_token]- username (required): Your GitHub username
- since_date (optional): Start date in YYYY-MM-DD format (defaults to 6 months ago)
- github_token (optional): GitHub Personal Access Token for higher rate limits and private repos
# Basic usage - analyze last 6 months of public activity
./github-activity-summary.sh your-username
# Analyze activity since a specific date
./github-activity-summary.sh your-username 2024-01-01
# With authentication for private repos and higher rate limits
./github-activity-summary.sh your-username 2024-01-01 ghp_your_token_hereFor the best results, create a Personal Access Token:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Generate new token with these scopes:
repo(for private repository access)read:org(for organization data)
- Set a reasonable expiration date
- Copy the token and use it as the third parameter
Important: Revoke the token after use for security.
The script creates a timestamped directory (e.g., github-summary-20241103) containing:
GitHub_Activity_Report.md- Formatted markdown report ready for sharing
repositories.json- Raw repository datarepositories_summary.txt- Human-readable repository listall_commits.json- All commits with metadatacommits_summary.txt- Formatted commit listpull_requests.json- PR data from GitHub search APIprs_summary.txt- Formatted PR listissues.json- Issues dataissues_summary.txt- Formatted issues listrecent_events.json- Recent activity eventsevents_summary.txt- Formatted activity summarystatistics.txt- Detailed statistics and breakdowns
- Without token: 60 requests per hour
- With token: 5,000 requests per hour
For users with many repositories, authentication is recommended to avoid hitting rate limits.
The generated report includes:
- Quantitative metrics: Number of commits, PRs, issues, repositories
- Qualitative insights: Commit messages, PR descriptions, project involvement
- Technology breadth: Programming languages and frameworks used
- Collaboration: PR reviews, issue discussions, community involvement
- Project impact: Repository stars, recent activity, project descriptions
The markdown report can be directly shared with managers or included in performance reviews.
-
"jq command not found"
brew install jq
-
Rate limit exceeded
- Use a GitHub token as the third parameter
- Wait an hour and try again (for unauthenticated requests)
-
Empty results
- Check the username spelling
- Verify the date format (YYYY-MM-DD)
- Try with a GitHub token if repositories are private
-
Invalid date format
- Use format: YYYY-MM-DD (e.g., 2024-01-01)
Run the script without parameters to see usage information:
./github-activity-summary.sh- The script only accesses public data by default
- Private data requires explicit token authentication
- No credentials are stored or transmitted except during API calls
- Consider using short-lived tokens and revoking them after use
github-summary-20241103/
├── GitHub_Activity_Report.md # Main formatted report
├── statistics.txt # Detailed statistics
├── repositories_summary.txt # Repository overview
├── commits_summary.txt # All commits listed
├── prs_summary.txt # Pull requests
├── issues_summary.txt # Issues created
├── events_summary.txt # Recent activity
└── *.json files # Raw API responses
The main report (GitHub_Activity_Report.md) provides a professional summary suitable for performance reviews, while the individual files offer detailed breakdowns for deeper analysis.