A Python tool to analyze GitHub organizations and extract author information from all repositories within an organization.
- Fetches all repositories from a specified GitHub organization
- Extracts commit author information (name and email) from each repository
- Handles pagination for large organizations and repositories
- Gracefully handles empty repositories and API errors
- Supports GitHub personal access tokens for authenticated requests
- Python 3.7 or higher
- GitHub personal access token (optional, but recommended for higher rate limits)
git clone <your-repository-url>
cd github-org-analyzer# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate
# Verify activation (you should see (venv) in your terminal prompt)
which python# Install virtualenv if you don't have it
pip install virtualenv
# Create a virtual environment
virtualenv venv
# Activate the virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate# Make sure your virtual environment is activated
pip install -r requirements.txtFor better rate limits and access to private repositories, set your GitHub personal access token:
# Set as environment variable
export GITHUB_TOKEN=your_github_token_here
# Or add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
echo 'export GITHUB_TOKEN=your_github_token_here' >> ~/.zshrc
source ~/.zshrcNote: If you don't set a token, the tool will work with unauthenticated requests but will have lower rate limits.
-
Activate your virtual environment (if not already active):
source venv/bin/activate -
Run the analyzer:
python main.py
-
Enter the GitHub organization name when prompted.
-
View results - the tool will display all repositories and their authors.
Enter GitHub organization name: example-org
Fetching repositories for organization 'example-org'...
Repository: project-a
- John Doe <john.doe@example.com>
- Jane Smith <jane.smith@example.com>
Repository: project-b
- John Doe <john.doe@example.com>
- Bob Wilson <bob.wilson@example.com>
Repository: empty-repo
No authors found.
The project requires the following Python packages (see requirements.txt):
requests- For making HTTP requests to GitHub API
- Without token: 60 requests per hour
- With token: 5,000 requests per hour
For large organizations with many repositories, consider using a GitHub token to avoid rate limiting.