Watch
0
0
Fork
You've already forked hyperhive
0

hive-forge: defer repo resolution to the accessor, not construction

This commit is contained in:
damocles 2026-09-02 15:18:56 +02:00 • committed by mara
commit fe7bf81d4a
14 changed files with 57 additions and 35 deletions

View file

@ -201,7 +201,7 @@ fn persisted_logs(client: &Client, repo: &str, args: &Args) -> Result<bool> {
/// (network, an unknown run number, or a non-2xx), if a requested `--step`
/// is out of range, or if both sources yield no log content.
pub fn run(client: &Client, args: Args) -> Result<()> {
let repo = client.repo();
let repo = client.repo()?;
let stream_path = format!("/{repo}/actions/runs/{}/jobs/{}", args.run, args.job);
// `--step` only has meaning against the live streamer's per-step
@ -259,7 +259,10 @@ fn no_log_message(client: &Client, args: &Args) -> String {
ones) or that the dispatch that was meant to create it actually \
landed.",
args.run,
client.repo(),
// `run` already resolved a repo successfully before calling
// this far into the log lookup, so this can't actually be
// absent — the fallback text is defensive, not a real path.
client.repo().unwrap_or("<unknown repo>"),
),
// The existence lookup itself failed (network, auth) — don't let a
// secondary failure mask the original "no log" finding.