MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / show_for_view

Method show_for_view

atomic-cli/src/commands/agent/attest.rs:469–504  ·  view source on GitHub ↗

Show attestations for a specific view.

(&self, repo: &Repository, view_name: &str)

Source from the content-addressed store, hash-verified

467
468 /// Show attestations for a specific view.
469 fn show_for_view(&self, repo: &Repository, view_name: &str) -> CliResult<()> {
470 let results = repo
471 .find_attestations_for_view(view_name)
472 .map_err(CliError::Repository)?;
473
474 if results.is_empty() {
475 println!("No attestations cover changes in view '{}'.", view_name);
476 return Ok(());
477 }
478
479 println!(
480 "{} attestation{} covering changes in '{}'",
481 results.len(),
482 if results.len() == 1 { "" } else { "s" },
483 view_name,
484 );
485 println!();
486
487 for (hash, attest, covered_in_view) in &results {
488 self.print_summary(hash, attest);
489 println!(
490 " Coverage in {}: {}/{} changes",
491 view_name,
492 covered_in_view.len(),
493 attest.change_count(),
494 );
495
496 if self.verbose {
497 self.print_models(attest);
498 self.print_changes(attest);
499 }
500 println!();
501 }
502
503 Ok(())
504 }
505
506 /// Show full details for a specific attestation.
507 fn show_detail(&self, repo: &Repository, hash_prefix: &str) -> CliResult<()> {

Callers 1

runMethod · 0.80

Calls 5

print_summaryMethod · 0.80
print_modelsMethod · 0.80
print_changesMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected