Skip to main content

gha sync

Overview

Syncs commits from GitHub repositories to a local SQLite database for offline querying. Supports incremental sync (default) and full re-sync. After syncing, use gha commits to query the local database.

Usage

python -m src.cli sync [OPTIONS]

Options

OptionDescriptionDefault
-u, --user USERNAMEGitHub username--
-o, --org NAMEOrganization name--
-r, --repo OWNER/REPOSpecific repository (repeatable)All repos
--fullForce full re-sync (ignore incremental)Incremental
--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

Examples

Incremental sync for all repos

python -m src.cli sync

Sync a specific organization

python -m src.cli sync --org symphonycore-org

Full re-sync for a specific repo

python -m src.cli sync --repo score-ra/github-automator --full
  • python -m src.cli commits -- query synced commits from local database
  • python -m src.cli commits --stats -- show commit statistics