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
| Option | Description | Default |
|---|---|---|
-u, --user USERNAME | GitHub username | -- |
-o, --org NAME | Organization name | -- |
-r, --repo OWNER/REPO | Specific repository (repeatable) | All repos |
--full | Force full re-sync (ignore incremental) | Incremental |
--format {console,json} | Output format | console |
Prerequisites
- Repo: github-automator
- Install:
pip install -r requirements.txtfrom repo root - Environment:
GITHUB_TOKENor 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
Related Commands
python -m src.cli commits-- query synced commits from local databasepython -m src.cli commits --stats-- show commit statistics