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

Function repo_with_intents

atomic-cli/src/commands/intent/list.rs:312–332  ·  view source on GitHub ↗

Create a repo+vault and N intents; return (repo, sorted ids, tempdir).

(n: usize)

Source from the content-addressed store, hash-verified

310
311 /// Create a repo+vault and N intents; return (repo, sorted ids, tempdir).
312 fn repo_with_intents(n: usize) -> (Repository, Vec<String>, tempfile::TempDir) {
313 let dir = tempdir().unwrap();
314 let repo = Repository::init(dir.path()).unwrap();
315 repo.init_vault().unwrap();
316 let mut ids = Vec::new();
317 for i in 0..n {
318 let result = repo
319 .vault_intent_create(IntentCreateOptions {
320 title: format!("Intent {i}"),
321 priority: Some("medium".to_string()),
322 assignee: None,
323 labels: Vec::new(),
324 session_id: None,
325 turn_id: None,
326 })
327 .unwrap();
328 ids.push(result.id);
329 }
330 ids.sort();
331 (repo, ids, dir)
332 }
333
334 /// Lift+attest a stored intent with a given keypair, returning the node.
335 fn attest_with(repo: &Repository, id: &str, kp: &KeyPair) -> CanonicalNode {

Callers 7

unattested_row_is_na_naFunction · 0.85
stale_is_stale_and_naFunction · 0.85
other_signer_is_na_not_xFunction · 0.85

Calls 6

vault_intent_createMethod · 0.80
sortMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45
init_vaultMethod · 0.45
pushMethod · 0.45

Tested by 7

unattested_row_is_na_naFunction · 0.68
stale_is_stale_and_naFunction · 0.68
other_signer_is_na_not_xFunction · 0.68