/gh-org-summary

GitHub Organisation Summary

Primary LanguagePythonMIT LicenseMIT

GitHub Organisation Summary

GitHub GitHub Issues GitHub Stars Licence

⚡️ Requirements

  • Python >= 3.10
  • pip >= 23.x
    • pip install ghastoolkit (>= 0.10.0)
  • gh-cli (optional)
  • GitHub Personal Access Token (PAT)
    • Requires access to org:read, repo:read, and repo:security_events scopes

📦 Installing

Using gh-cli:

To install and setup the CLI tool, you can use the following commands:

# install extension
gh extension install GeekMasher/gh-org-summary
# install deps (ghastoolkit)
gh org-summary install
# run
gh org-summary --help
# update / upgrade extension
gh extension upgrade gh-org-summary

Install Manually:

# clone and cd into repo
clone https://github.com/GeekMasher/gh-org-summary.git
cd gh-org-summary
# install deps (ghastoolkit)
pip install ghastoolkit
# run
python ./summary.py --help

📝 Usage

To generate a summary of your GitHub organisation, you can use the following command:

gh org-summary \
    --github-instance "https://github.example.com" \
    --output "./output.csv"

Access Token:

The script automatically looks for the GITHUB_TOKEN environment variable but you can also supply the token via the -t or --github-token argument or it will prompt you.

gh org-summary \
    --github-instance "https://github.example.com" \
    --output "./output.csv" \
    --github-token "ghp_1234567890"

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.