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

Function lift_ac

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

Source from the content-addressed store, hash-verified

139}
140
141fn lift_ac(d: &Directive, human_key: &str, n: usize) -> Result<AcceptanceCriterion> {
142 let local =
143 d.id.clone()
144 .unwrap_or_else(|| format!("{}-ac-{n}", slug(human_key)));
145 Ok(AcceptanceCriterion {
146 type_: NodeType::AcceptanceCriterion.as_str().to_string(),
147 id: as_urn("ac", &local),
148 text: d.body.clone(),
149 ac_status: d.attr("status").unwrap_or("open").to_string(),
150 verified_by: d.attr("verifiedBy").map(str::to_string),
151 evidence: d.attr("evidence").map(str::to_string),
152 })
153}
154
155fn lift_task(d: &Directive, human_key: &str, n: usize) -> Task {
156 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