huskies: merge 1046

This commit is contained in:
dave
2026-05-14 16:13:01 +00:00
parent 8f6ba69bf2
commit 9e06fff8a8
6 changed files with 342 additions and 134 deletions
+3 -1
View File
@@ -234,11 +234,13 @@ pub async fn fetch_one_project_pipeline_items(url: &str, client: &Client) -> Val
match serde_json::from_str::<Value>(text) {
Ok(pipeline) => {
let active = pipeline.get("active").cloned().unwrap_or(json!([]));
let backlog = pipeline.get("backlog").cloned().unwrap_or(json!([]));
let backlog_count = pipeline
.get("backlog_count")
.and_then(|n| n.as_u64())
.unwrap_or(0);
json!({ "active": active, "backlog_count": backlog_count })
let archived = pipeline.get("archived").cloned().unwrap_or(json!([]));
json!({ "active": active, "backlog": backlog, "backlog_count": backlog_count, "archived": archived })
}
Err(_) => json!({ "error": "invalid pipeline JSON" }),
}
+3
View File
@@ -249,6 +249,7 @@ mod tests {
epic_id: None,
}],
closed: vec![],
archived: vec![],
deterministic_merges_in_flight: vec![],
};
let resp = pipeline_state_to_response(state);
@@ -273,6 +274,7 @@ mod tests {
merge: vec![],
done: vec![],
closed: vec![],
archived: vec![],
deterministic_merges_in_flight: vec![],
};
let resp = pipeline_state_to_response(state);
@@ -311,6 +313,7 @@ mod tests {
merge: vec![],
done: vec![],
closed: vec![],
archived: vec![],
deterministic_merges_in_flight: vec![],
};
let resp: WsResponse = state.into();