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¶
-
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¶
-
upload_asset
(path: str, label: str = '', content_type: Union[str, github.GithubObject._NotSetType] = NotSet, name: Union[str, github.GithubObject._NotSetType] = NotSet) → github.GitReleaseAsset.GitReleaseAsset¶
-
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 thename
, 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 byopen("file_name", "rb")
. At the very minimum, this object must implementread()
. :param file_size: int, size in bytes offile_like
-
get_assets
() → github.PaginatedList.PaginatedList[github.GitReleaseAsset.GitReleaseAsset][github.GitReleaseAsset.GitReleaseAsset]¶
-