From 8e6c813325462894b72d6356a140c5e9913367db Mon Sep 17 00:00:00 2001 From: atlas Date: Sun, 20 Sep 2026 17:28:49 +0200 Subject: [PATCH] hive-forge: print the ref ci-runs --branch resolved to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qualify_ref (ci_runs.rs:84-93) reads '#N' and an all-digit value as a PR, anything else as a branch — so '--branch #4540' and '--branch ops-4502-swarm-agent-icon' for the same PR/head commit answer two disjoint questions with no indication which one was asked. Print the resolved ref to stderr whenever --branch is given, so the output states which question it answered. Stdout is untouched in both plain and --json mode, so no existing invocation's parsed output changes. An all-digit branch name stays reachable via --branch refs/heads/ (already documented, unchanged). --- hive-forge/src/verbs/ci_runs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hive-forge/src/verbs/ci_runs.rs b/hive-forge/src/verbs/ci_runs.rs index c7bf9881..1c6c3fc5 100644 --- a/hive-forge/src/verbs/ci_runs.rs +++ b/hive-forge/src/verbs/ci_runs.rs @@ -41,9 +41,13 @@ pub struct Args { /// Returns an error if the list request fails (network, or a non-2xx). pub fn run(client: &Client, args: Args) -> Result<()> { let (owner, name) = client.owner_repo()?; + let qualified_ref = args.branch.as_deref().map(qualify_ref); + if let (Some(given), Some(resolved)) = (args.branch.as_deref(), qualified_ref.as_deref()) { + eprintln!("hive-forge: --branch {given:?} -> {resolved}"); + } let query = ListActionRunsQuery { workflow_id: args.workflow.clone(), - r#ref: args.branch.as_deref().map(qualify_ref), + r#ref: qualified_ref, ..Default::default() }; let body = client