Skip to content

etnt/github-summary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

GitHub Activity Summary Script

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.

Features

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

Prerequisites

  • curl (usually pre-installed on macOS)
  • jq - Install with: brew install jq (on Mac)

Usage

./github-activity-summary.sh <username> [since_date] [github_token]

Parameters

  1. username (required): Your GitHub username
  2. since_date (optional): Start date in YYYY-MM-DD format (defaults to 6 months ago)
  3. github_token (optional): GitHub Personal Access Token for higher rate limits and private repos

Examples

# 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_here

GitHub Token Setup (Optional but Recommended)

For the best results, create a Personal Access Token:

  1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Generate new token with these scopes:
    • repo (for private repository access)
    • read:org (for organization data)
  3. Set a reasonable expiration date
  4. Copy the token and use it as the third parameter

Important: Revoke the token after use for security.

Output

The script creates a timestamped directory (e.g., github-summary-20241103) containing:

Main Report

  • GitHub_Activity_Report.md - Formatted markdown report ready for sharing

Detailed Data Files

  • repositories.json - Raw repository data
  • repositories_summary.txt - Human-readable repository list
  • all_commits.json - All commits with metadata
  • commits_summary.txt - Formatted commit list
  • pull_requests.json - PR data from GitHub search API
  • prs_summary.txt - Formatted PR list
  • issues.json - Issues data
  • issues_summary.txt - Formatted issues list
  • recent_events.json - Recent activity events
  • events_summary.txt - Formatted activity summary
  • statistics.txt - Detailed statistics and breakdowns

Rate Limits

  • 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.

Performance Evaluation Use

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.

Troubleshooting

Common Issues

  1. "jq command not found"

    brew install jq
  2. Rate limit exceeded

    • Use a GitHub token as the third parameter
    • Wait an hour and try again (for unauthenticated requests)
  3. Empty results

    • Check the username spelling
    • Verify the date format (YYYY-MM-DD)
    • Try with a GitHub token if repositories are private
  4. Invalid date format

    • Use format: YYYY-MM-DD (e.g., 2024-01-01)

Getting Help

Run the script without parameters to see usage information:

./github-activity-summary.sh

Privacy and Security

  • 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

Example Output Structure

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.

About

GitHub Activity Summary Script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages