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

Method adoption_operation_ids

atomic-cli/tests/it/git_adoption_cb7b_test.rs:232–248  ·  view source on GitHub ↗

Operation IDs whose system actor matches `actor_name`.

(&self, actor_name: &str)

Source from the content-addressed store, hash-verified

230
231 /// Operation IDs whose system actor matches `actor_name`.
232 fn adoption_operation_ids(&self, actor_name: &str) -> Vec<String> {
233 let log = atomic_ok(
234 self.root(),
235 self.home(),
236 &["op", "log", "--json", "-n", "60"],
237 );
238 let value: serde_json::Value = serde_json::from_str(&log).expect("op log json");
239 value["entries"]
240 .as_array()
241 .expect("log entries")
242 .iter()
243 .filter(|entry| {
244 entry["actor"]["kind"] == "system" && entry["actor"]["name"] == actor_name
245 })
246 .filter_map(|entry| entry["id"].as_str().map(str::to_string))
247 .collect()
248 }
249
250 /// The decoded bytes of a content-addressed change (contents, hunks, and
251 /// hashed metadata) for store-level assertions.

Calls 6

atomic_okFunction · 0.70
rootMethod · 0.45
homeMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected