Skip to main content

prove_tag

Function prove_tag 

Source
pub fn prove_tag(
    token: &str,
    repo: &Repo,
    tag: &str,
    head: &str,
    delays: &[Duration],
) -> Result<()>
Expand description

Prove that tag names head, reading it again after each of delays while GitHub answers 404.

Publishing a draft creates its tag, and GitHub can serve the tag a moment after the Release. Only a 404 is read again: any other error, and a tag that names another commit, fail at once.

ยงErrors

Returns an error when the GitHub client cannot be built, a read fails with anything but 404, the tag names a commit other than head, or every read answers 404. The last names the tag and the number of reads.