GitRelease

class github.GitRelease.GitRelease

This class represents GitReleases.

The reference can be found here https://docs.github.com/en/rest/reference/repos#releases

delete_release() → None
Calls

DELETE /repos/{owner}/{repo}/releases/{release_id}

update_release(name: str, message: str, draft: bool = False, prerelease: bool = False, tag_name: Union[str, github.GithubObject._NotSetType] = NotSet, target_commitish: Union[str, github.GithubObject._NotSetType] = NotSet) → github.GitRelease.GitRelease
Calls

PATCH /repos/{owner}/{repo}/releases/{release_id}

upload_asset(path: str, label: str = '', content_type: Union[str, github.GithubObject._NotSetType] = NotSet, name: Union[str, github.GithubObject._NotSetType] = NotSet) → github.GitReleaseAsset.GitReleaseAsset
Calls

POST https://<upload_url>/repos/{owner}/{repo}/releases/{release_id}/assets

upload_asset_from_memory(file_like: BinaryIO, file_size: int, name: str, content_type: Union[str, github.GithubObject._NotSetType] = NotSet, label: str = '') → github.GitReleaseAsset.GitReleaseAsset

Uploads an asset.

Unlike upload_asset() this method allows you to pass in a file-like object to upload. Note that this method is more strict and requires you to specify the name, since there’s no file name to infer these from. :calls: POST https://<upload_url>/repos/{owner}/{repo}/releases/{release_id}/assets :param file_like: binary file-like object, such as those returned by open("file_name", "rb"). At the very minimum, this object must implement read(). :param file_size: int, size in bytes of file_like

get_assets() → github.PaginatedList.PaginatedList[github.GitReleaseAsset.GitReleaseAsset][github.GitReleaseAsset.GitReleaseAsset]
Calls

GET /repos/{owner}/{repo}/releases/{release_id}/assets