pub fn open_draft(
token: &str,
repo: &Repo,
release: &NewRelease<'_>,
found: &DraftState,
) -> Result<u64>Expand description
The id of the draft for release: the one found names at HEAD, or a new
draft with target_commitish set to release.sha.
A stale draft is deleted first.
The draft creates no tag: GitHub creates it at target_commitish when the
draft is published (create a release).
Until then the draft can still be changed or deleted, so a failed upload
leaves no tag behind.
ยงErrors
Returns an error when the GitHub client cannot be built, a stale draft cannot be deleted, or the draft cannot be created. A 403 on the create names the missing permission.