ref:b8c4218632041e0b70ab6d47a04bbb5af3c8d29d

fix(cli): ci cancel shows response status

Replace post_empty (which discards the response) with post + empty JSON body, then parse and display the actual short_id and status from the server response. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SHA: b8c4218632041e0b70ab6d47a04bbb5af3c8d29d
Author: Cole Christensen <cole.christensen@macmillan.com>
Date: 2026-03-21 20:21
Parents: 9dfc133
1 files changed +15 -3
Type
src/commands/ci.rs +15 −3
@@ -435,10 +435,22 @@
let client = Client::from_config()?;
let (org, name) = config::resolve_repo(repo)?;
let resp: serde_json::Value = client
.post(
&format!("/{org}/{name}/ci/runs/{id}/cancel"),
&serde_json::json!({}),
)
client
.post_empty(&format!("/{org}/{name}/ci/runs/{id}/cancel"))
.await?;
output::success(&format!("Cancelled CI run {id}"));
let status = resp
.get("status")
.and_then(|v| v.as_str())
.unwrap_or("cancelled");
let short_id = resp
.get("short_id")
.and_then(|v| v.as_str())
.unwrap_or(id);
output::success(&format!("Cancelled CI run {short_id} (status: {status})"));
Ok(())
}