GitRelease¶
-
class
github.GitRelease.GitRelease¶ This class represents GitReleases. The reference can be found here https://docs.github.com/en/rest/reference/repos#releases
-
id¶ Type: integer
-
body¶ Type: string
-
title¶ Type: string
-
tag_name¶ Type: string
-
target_commitish¶ Type: string
-
draft¶ Type: bool
-
prerelease¶ Type: bool
-
created_at¶ Type: datetime.datetime
-
published_at¶ Type: datetime.datetime
-
url¶ Type: string
-
upload_url¶ Type: string
-
html_url¶ Type: string
-
tarball_url¶ Type: string
-
zipball_url¶ Type: string
-
assets¶ Type: list of github.GitReleaseAsset.GitReleaseAsset
-
delete_release()¶ Calls: DELETE /repos/{owner}/{repo}/releases/{release_id} Return type: None
-
update_release(name, message, draft=False, prerelease=False, tag_name=NotSet, target_commitish=NotSet)¶ Calls: Parameters: - name – string
- message – string
- draft – bool
- prerelease – bool
- tag_name – string
- target_commitish – string
Return type:
-
upload_asset(path, label='', content_type=NotSet, name=NotSet)¶ Calls: POST https://<upload_url>/repos/{owner}/{repo}/releases/{release_id}/assets
Parameters: - path – string
- label – string
- content_type – string
- name – string
Return type:
-
upload_asset_from_memory(file_like, file_size, name, content_type=NotSet, label='')¶ 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:param content_type: string :param name: string :param label: string :rtype:github.GitReleaseAsset.GitReleaseAsset
-
get_assets()¶ Calls: GET /repos/{owner}/{repo}/releases/{release_id}/assets Return type: github.PaginatedList.PaginatedList
-