gha reconcile
Overview
Fetches repositories from the GitHub API and compares them with the local YAML inventory. Reports differences: new repos not yet in inventory, removed repos, and archived status changes. Use --apply to update the inventory file automatically.
Usage
python -m src.cli reconcile [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
--apply | Apply changes to inventory file | Dry-run |
--include-forks | Include forked repos in "new" list | Excluded |
-c, --config PATH | Path to repo-inventory.yaml | Auto-detected |
--format {console,json} | Output format | console |
Prerequisites
- Repo: github-automator
- Install:
pip install -r requirements.txtfrom repo root - Environment:
GITHUB_TOKENor account-specific tokens - Config:
config/repo-inventory.yamlmust exist
Examples
Dry-run reconciliation (show drift only)
python -m src.cli reconcile
Apply changes to the inventory
python -m src.cli reconcile --apply
Include forked repos
python -m src.cli reconcile --include-forks --format json
Related Commands
gha update-repo-inventory-- profile-based reconciliation across all accountsgha classify-- view repo classifications from inventory