Skip to main content

release_state

Function release_state 

Source
pub fn release_state(
    token: &str,
    repo: &Repo,
    tag: &str,
    list: &ReleaseList,
) -> Result<ReleaseState>
Expand description

Read the tag and the Release for tag, so a plan can tell which parts of a release still need doing. The Release is read even when the tag is missing: a draft has no tag until it is published, so a tagless draft is an incomplete release.

ยงErrors

Returns an error when the GitHub client cannot be built or when GitHub answers a tag or Release lookup with an error other than 404. It also returns one when the tag points at a tree or a blob.

Only a lookup that GitHub gave no answer to, meaning a transport failure or a 5xx, is a verctl_core::lookup::Unavailable. A 401 from a bad token, a tag on a tree, and a malformed GITHUB_API_URL stay unmarked.

The Releases list comes from list, so the lookups of one plan read it once however many tags are missing.