Extracts directory paths from the GitHub API tree response
(tree_value: &Value)
| 131 | |
| 132 | /// Extracts directory paths from the GitHub API tree response |
| 133 | fn extract_tree_directories(tree_value: &Value) -> Result<Vec<String>> { |
| 134 | Ok(serde_json::from_value::<Vec<Value>>(tree_value["tree"].clone())? |
| 135 | .into_iter() |
| 136 | .filter_map(|item| { |
| 137 | if item["type"] == "tree" { serde_json::from_value::<String>(item["path"].clone()).ok() } else { None } |
| 138 | }) |
| 139 | .collect()) |
| 140 | } |
| 141 | |
| 142 | /// Parses a spec path in the format "{name}-{version}" into (name, version) |
| 143 | /// |
no test coverage detected