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

Method show_for_view

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

Show attestations for a specific view.

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

Source from the content-addressed store, hash-verified

338
339 /// Show attestations for a specific view.
340 fn show_for_view(&self, repo: &Repository, view_name: &str) -> CliResult<()> {
341 let results = repo
342 .find_attestations_for_view(view_name)
343 .map_err(CliError::Repository)?;
344
345 if results.is_empty() {
346 println!("No attestations cover changes in view '{}'.", view_name);
347 return Ok(());
348 }
349
350 println!(
351 "{} attestation{} covering changes in '{}'",
352 results.len(),
353 if results.len() == 1 { "" } else { "s" },
354 view_name,
355 );
356 println!();
357
358 for (hash, attest, covered_in_view) in &results {
359 self.print_summary(hash, attest);
360 println!(
361 " Coverage in {}: {}/{} changes",
362 view_name,
363 covered_in_view.len(),
364 attest.change_count(),
365 );
366
367 if self.verbose {
368 self.print_models(attest);
369 self.print_changes(attest);
370 }
371 println!();
372 }
373
374 Ok(())
375 }
376
377 /// Show full details for a specific attestation.
378 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