Skip to main content

run_id

Function run_id 

Source
pub fn run_id(
    origin: Origin,
    run: Option<&RunRef>,
    commit: &str,
    at: &str,
) -> String
Expand description

The id of a recording: <origin>:<provider>:<run id>:<attempt> for a CI run, else <origin>:<commit[..12]>:<at without '-' and ':'>.

use majordomus_cli::evidence::{run_id, Origin};
let c = "0123456789abcdef0123456789abcdef01234567";
assert_eq!(run_id(Origin::Local, None, c, "2026-09-26T12:00:00Z"),
    "local:0123456789ab:20260926T120000Z");