Skip to main content

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

OptionDescriptionDefault
--applyApply changes to inventory fileDry-run
--include-forksInclude forked repos in "new" listExcluded
-c, --config PATHPath to repo-inventory.yamlAuto-detected
--format {console,json}Output formatconsole

Prerequisites

  • Repo: github-automator
  • Install: pip install -r requirements.txt from repo root
  • Environment: GITHUB_TOKEN or account-specific tokens
  • Config: config/repo-inventory.yaml must 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