pub async fn watch_build(
client: &HarmontClient,
log_base: &str,
org: &str,
pipeline: &str,
number: i64,
tx: Sender<BuildEvent>,
) -> Result<i32>Expand description
Watch build #number until terminal, emitting BuildEvents on tx.
log_base is the host serving the SSE log stream (the API base in prod).
Returns the terminal exit code via [exit_code_for_state]: 0 passed, 130
canceled, 1 otherwise.
§Errors
Returns an error if any SDK call fails (build status poll, job list, or log
token fetch). A dropped receiver (tx) is treated as a clean early exit
(Ok(1)) — not an error.