GitRelease¶
-
class
github.GitRelease.GitRelease¶ This class represents GitReleases.
The reference can be found here https://docs.github.com/en/rest/reference/repos#releases
The OpenAPI schema can be found at - /components/schemas/release
A CompletableGithubObject can be partially initialised (completed=False). Accessing attributes that are not initialized will then trigger a request to complete all attributes.
A partially initialized CompletableGithubObject (completed=False) can be completed via complete(). This requires the url to be given via parameter url or attributes.
With a requester where Requester.is_lazy == True, this CompletableGithubObjects is partially initialized. This requires the url to be given via parameter url or attributes. Any CompletableGithubObject created from this lazy object will be lazy itself if created with parameter url or attributes.
- Parameters
requester – requester
headers – response headers
attributes – attributes to initialize
completed – do not update non-initialized attributes when True
url – url of this instance, overrides attributes[‘url’]
accept – use this accept header when completing this instance
-
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, make_latest: Union[str, github.GithubObject._NotSetType] = NotSet, discussion_category_name: 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]¶