docs(hive-forge): add the missing # Errors section on fetch_combined_in

This commit is contained in:
atlas 2026-07-26 19:41:34 +02:00 committed by mara
commit 37ae72c19d

View file

@ -165,6 +165,13 @@ fn pr_status(client: &Client, repo: &str, pr: u64) -> Result<()> {
/// Fetch the combined commit status for `sha` in the client's repo.
/// Goes through the raw-JSON escape hatch rather than the typed client
/// so an empty (no-CI) state stays reportable — see [`CombinedStatus`].
///
/// # Errors
///
/// Returns an error if `repo` isn't a well-formed `owner/name`, or if
/// the status GET fails (transport, non-2xx, or a body that isn't even
/// loosely the expected shape). An empty state is NOT an error — that's
/// the case this function exists to report.
pub(crate) fn fetch_combined_in(client: &Client, repo: &str, sha: &str) -> Result<CombinedStatus> {
let (owner, name) = crate::client::split_repo(repo)?;
client.get_api_json(&format!("/repos/{owner}/{name}/commits/{sha}/status"), &[])