docs(hive-forge): add the missing # Errors section on fetch_combined_in
This commit is contained in:
parent
1219f31c2f
commit
37ae72c19d
1 changed files with 7 additions and 0 deletions
|
|
@ -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.
|
/// Fetch the combined commit status for `sha` in the client's repo.
|
||||||
/// Goes through the raw-JSON escape hatch rather than the typed client
|
/// Goes through the raw-JSON escape hatch rather than the typed client
|
||||||
/// so an empty (no-CI) state stays reportable — see [`CombinedStatus`].
|
/// 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> {
|
pub(crate) fn fetch_combined_in(client: &Client, repo: &str, sha: &str) -> Result<CombinedStatus> {
|
||||||
let (owner, name) = crate::client::split_repo(repo)?;
|
let (owner, name) = crate::client::split_repo(repo)?;
|
||||||
client.get_api_json(&format!("/repos/{owner}/{name}/commits/{sha}/status"), &[])
|
client.get_api_json(&format!("/repos/{owner}/{name}/commits/{sha}/status"), &[])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue