Skip to main content

Module ingest

Module ingest 

Source
Expand description

Batch, cursor-based git-history ingester (ADR-088 §5). One-shot: walks local git history plus (optionally) gh-fetched issues and pull requests, and writes commit / issue / pull_request notes through the standard create verb. See crates/khive-pack-git/docs/api/ingest.md for the full module overview.

Structs§

IngestInclude
Which record kinds a run_ingest pass processes. Default selects all three — the CLI’s historical behavior and the git.digest verb’s default (ADR-088 Amendment 1).
IngestOptions
Options for one ingest pass.
IngestReport
Outcome of one ingest pass. Serializable so CLI callers can emit it as JSON.

Functions§

resolve_project_id
Resolve raw (a full UUID or an 8+ hex prefix) to an existing project entity id, unfiltered by namespace. Returns Ok(None) when no entity matches; never creates one. Used by the git.digest verb handler to resolve an explicitly supplied project argument.
run_ingest
Run one ingest pass over opts.repo: issues + PRs first (via gh, when available), then commits (via local git log), each bounded by opts.max_items and cursor-resumable (call again while the returned IngestReport.done is false). Returns an error only for a failure that aborts the whole pass (e.g. an unresolvable opts.project); per-record failures are collected in IngestReport.warnings instead. See crates/khive-pack-git/docs/api/ingest.md#run_ingest_with_commit_recovery for why this has no self-healing recovery (unlike the verb-handler path).