fdroidserver.github module#
- class fdroidserver.github.GithubApi(api_token, repo_path)#
Bases:
objectWrapper for some select calls to GitHub Json/REST API.
This class wraps some calls to api.github.com. This is not intended to be a general API wrapper. Instead it’s purpose is to return pre-filtered and transformed data that’s playing well with other fdroidserver functions.
With the GitHub API, the token is optional, but it has pretty severe rate limiting.
Methods
create_release(tag, files[, body])Create a new release on github.
Get list of all tags for this repo on GitHub.
List of all tags that are associated with a release for this repo on GitHub.
tag_exists(tag)Check if git tag is present on github.
get_latest_apk
list_unreleased_tags
- create_release(tag, files, body='')#
Create a new release on github.
also see: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
- Returns:
True if release was created, False if release already exists
- Raises:
urllib exceptions in case of network or api errors, also raises an exception when the tag doesn’t exists.
- get_latest_apk()#
- list_all_tags()#
Get list of all tags for this repo on GitHub.
- list_released_tags()#
List of all tags that are associated with a release for this repo on GitHub.
- list_unreleased_tags()#
- tag_exists(tag)#
Check if git tag is present on github.