bork.github_api

class bork.github_api.GithubApi(owner, repo, project_name, token)

Bases: object

Basic wrapper for the GitHub API.

Usage:

gh = GithubApi(‘duckinator’, ‘bork’, ‘<token>’) gh.create_release(‘TEST-RELEASE’, assets={‘dist/bork-4.0.5.pyz’: ‘bork.pyz’})

add_release_asset(upload_url, local_file, name)
changelog()
create_release(tag_name, name=None, commitish=None, body=None, draft=True, prerelease=None, assets=None)

tag_name is the name of the tag. commitish is a commit hash, branch, tag, etc. body is the body of the commit. draft indicates whether it should be a draft release or not. prerelease indicates whether it should be a prerelease or not. assets is a dict mapping local file paths to the uploaded asset name.

property last_release
publish(release)
static run(*command)