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

Function lift_ac

atomic-canonical/src/lift.rs:141–156  ·  view source on GitHub ↗
(d: &Directive, id_base: &str, n: usize)

Source from the content-addressed store, hash-verified

139}
140
141fn lift_ac(d: &Directive, id_base: &str, n: usize) -> Result<AcceptanceCriterion> {
142 // Child ids are namespaced under the intent's stable id base (its ULID for
143 // intents created via `atomic intent new`) so they are globally unique and
144 // do not inherit the human key's `::`/`-` separators.
145 let local =
146 d.id.clone()
147 .unwrap_or_else(|| format!("{}-ac-{n}", slug(id_base)));
148 Ok(AcceptanceCriterion {
149 type_: NodeType::AcceptanceCriterion.as_str().to_string(),
150 id: as_urn("ac", &local),
151 text: d.body.clone(),
152 ac_status: d.attr("status").unwrap_or("open").to_string(),
153 verified_by: d.attr("verifiedBy").map(str::to_string),
154 evidence: d.attr("evidence").map(str::to_string),
155 })
156}
157
158fn lift_task(d: &Directive, id_base: &str, n: usize) -> Task {
159 let local =

Callers 1

lift_intentFunction · 0.85

Calls 4

as_urnFunction · 0.85
attrMethod · 0.80
cloneMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected