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 (so KindHook validation and annotates edge creation run exactly as they would for any other caller). Reuses ADR-087’s operational pattern (cursor table, secret masking on ingest, cursor advances only on success) — NOT a daemon loop, NOT a webhook, NOT a poller: one pass per invocation.

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
Public wrapper for the git.digest verb handler, which needs to resolve (but never auto-create) an explicitly supplied project argument the same way run_ingest does.
run_ingest
Run one ingest pass: issues + PRs first (via gh, when available), then commits (via local git log). PRs are ingested before commits so a commit’s annotates list can reference an already-created merging-PR note (the generic create verb validates annotates targets exist before it writes — see khive-runtime::operations::create_note_inner).