Skip to main content

import_annotations

Function import_annotations 

Source
pub fn import_annotations<R: BufRead>(
    git_ops: &dyn GitOps,
    reader: R,
    force: bool,
    dry_run: bool,
) -> Result<ImportSummary>
Expand description

Import annotations from a JSONL reader.

Each line is an ExportEntry JSON object. For each entry:

  1. Validate the annotation can be parsed (v1 or v2).
  2. Check if the commit SHA exists locally.
  3. If the commit has no existing note (or force is set), write the annotation.
  4. Otherwise skip.