Skip to content

autodesk-github/OrgRepoScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OrgRepoScanner

Overview

OrgRepoScanner is a Python tool for scanning all organizations in a GitHub Enterprise instance and exporting repository data to CSV files.
It uses the GitHub REST API and a Personal Access Token (PAT) for authentication.
The scanner collects information about repositories, including whether they are archived, use Git LFS, or have webhooks.


Features

  • Scans all organizations the authenticated user is a member of
  • Lists all repositories in each organization
  • Detects archived repositories
  • Checks for Git LFS usage (.gitattributes with filter=lfs)
  • Checks for webhooks
  • Outputs summary and detailed CSV reports
  • Parallel scanning for speed

Requirements

Install dependencies:

pip install requests python-dotenv tqdm

Configuration

Create a .env file in the project root with the following variables:

# GitHub Enterprise Server URL
source_Git=https://git.autodesk.com

# Personal Access Token (PAT) with read:org and repo scopes
GH_SOURCE_PAT=your_personal_access_token

# Enterprise name (slug)
SOURCE_ENT_NAME=autodesk-inc

# Optional: Logging and output settings
LOG_LEVEL=INFO
OUTPUT_FORMAT=csv

Usage

Run the scanner:

python export_org_repos.py

Output files will be created in the current directory:

  • enterprise_orgs_summary_<date>.csv
  • enterprise_repos_detailed_<date>.csv
  • enterprise_webhooks_<date>.csv (if webhooks found)
  • enterprise_lfs_<date>.csv (if LFS found)

How It Works

  1. Authenticates to GitHub Enterprise using your PAT.
  2. Discovers organizations you are a member of.
  3. Scans each organization for repositories.
  4. For each repository, checks if it is archived, uses LFS, or has webhooks.
  5. Writes results to CSV files and prints a summary.

Troubleshooting

  • Make sure your PAT has the required scopes (read:org, repo).
  • Ensure your base URL and enterprise name are correct.
  • If you see errors accessing organizations or repositories, check your permissions and org membership.

License

MIT License


Maintainers

  • Autodesk Engineering Tools

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages