GitHub Organization Statistics Tool
A comprehensive, open-source tool for analyzing GitHub organization statistics including repository metrics, contributor activity, code quality insights, and multi-organization support with GitHub Apps.
🚀 Features
- Repository Analysis: Comprehensive metrics including stars, forks, issues, languages, and activity
- Contributor Insights: Detailed contributor analysis with bot filtering capabilities
- Code Quality Metrics: Language statistics, dependency analysis, and security insights
- Multi-Organization Support: GitHub App authentication for analyzing multiple organizations
- Flexible Output: JSON, CSV, and Excel formats with rich formatting
- Advanced Filtering: Include/exclude forks, archived repos, empty repos, and bot accounts
- Rate Limit Management: Intelligent rate limiting and retry mechanisms
- Error Handling: Robust error handling with detailed logging and recovery
📦 Installation
Prerequisites
- Python 3.7 or higher
- pip package manager
Install Dependencies
pip install -r requirements.txt
Quick Install
git clone https://github.com/zoharbabin/github-org-stats.git
cd github-org-stats
pip install -r requirements.txt
🔧 Quick Start
Basic Usage
Analyze a GitHub organization with a personal access token:
python github_org_stats.py --org your-org --token ghp_your_token_here
GitHub App Authentication
For enterprise use and higher rate limits:
python github_org_stats.py \
--org your-org \
--app-id 12345 \
--private-key /path/to/private-key.pem \
--installation-id 67890
Advanced Usage
# Generate all output formats with bot filtering
python github_org_stats.py \
--org your-org \
--token ghp_token \
--format all \
--exclude-bots \
--days-back 90 \
--output-dir ./reports
📊 Output Formats
Excel Output (Default)
- Repository_Data: Complete repository information
- Summary: High-level organization statistics
- Contributors: Top contributors analysis
- Languages: Language distribution
- Errors: Error tracking information
JSON Output
Structured JSON with complete data hierarchy for programmatic access.
CSV Output
Flattened data suitable for spreadsheet analysis and data processing tools.
🔐 Authentication
Personal Access Token
For individual use or small-scale analysis:
- Required permissions:
repo,read:org,read:user
GitHub App
For enterprise use and multi-organization analysis:
- Higher rate limits
- Better security
- Multi-organization support
See docs/USAGE.md for detailed authentication setup.
📖 Documentation
- Usage Guide - Comprehensive usage documentation
- Migration Guide - Migration from other tools
- Development Guide - Contributing and development setup
🧪 Testing
Run the test suite:
cd tests
python test_github_org_stats.py
Run specific test categories:
python test_github_org_stats.py --category auth
python test_github_org_stats.py --category data
🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
- Fork the repository
- Create a feature branch
- Install development dependencies:
pip install -r requirements-dev.txt - Make your changes
- Run tests:
python -m pytest tests/ - Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Documentation: Check our comprehensive usage guide
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Join the conversation in GitHub Discussions
🌟 Star History
🙏 Acknowledgments
- Thanks to all contributors who have helped improve this tool
- Built with PyGithub for GitHub API access
- Inspired by the need for comprehensive GitHub organization analysis
Made with ❤️ by the open-source community
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file github_org_stats-0.1.0.tar.gz.
File metadata
- Download URL: github_org_stats-0.1.0.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe59fdd4f89d59570feb89e08528ce0dc8d310e80c99c8c634d09d6d238ca54f
|
|
| MD5 |
a76b2391015e7b6a4e4f071c23a6b985
|
|
| BLAKE2b-256 |
f8298986d8a138e7c741e6802f74124d4fedf110798aac75c6019df6dd28b908
|
Provenance
The following attestation bundles were made for github_org_stats-0.1.0.tar.gz:
Publisher:
test-and-publish.yml on zoharbabin/github-org-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
github_org_stats-0.1.0.tar.gz -
Subject digest:
fe59fdd4f89d59570feb89e08528ce0dc8d310e80c99c8c634d09d6d238ca54f - Sigstore transparency entry: 223452560
- Sigstore integration time:
-
Permalink:
zoharbabin/github-org-stats@e309327d4ea14906d160734926baaa6029ff6675 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zoharbabin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-and-publish.yml@e309327d4ea14906d160734926baaa6029ff6675 -
Trigger Event:
push
-
Statement type:
File details
Details for the file github_org_stats-0.1.0-py3-none-any.whl.
File metadata
- Download URL: github_org_stats-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b5d8549f73304f02450124d46778162cbf1bec7a9be084bff100a57f7af9d4b
|
|
| MD5 |
1f7f1c11c54394887c83c167c70d993b
|
|
| BLAKE2b-256 |
c47e11aec1e30a3382351f34967ef62e2b90da7f8ba20def42400dbe7af125f1
|
Provenance
The following attestation bundles were made for github_org_stats-0.1.0-py3-none-any.whl:
Publisher:
test-and-publish.yml on zoharbabin/github-org-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
github_org_stats-0.1.0-py3-none-any.whl -
Subject digest:
8b5d8549f73304f02450124d46778162cbf1bec7a9be084bff100a57f7af9d4b - Sigstore transparency entry: 223452570
- Sigstore integration time:
-
Permalink:
zoharbabin/github-org-stats@e309327d4ea14906d160734926baaa6029ff6675 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zoharbabin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-and-publish.yml@e309327d4ea14906d160734926baaa6029ff6675 -
Trigger Event:
push
-
Statement type: