devops.release.github
Minimal GitHub REST client for the release tooling.
Classes
|
Send JSON requests to the GitHub REST API. |
- class devops.release.github.GitHubClient(api_url=None, token=None, timeout=30)[source]
Bases:
objectSend JSON requests to the GitHub REST API.
The API URL comes from
GITHUB_API_URLand the token fromGH_TOKENorGITHUB_TOKEN, as set by GitHub Actions.- request(path, *, query=None, data=None, allow_missing=False)[source]
Send a GET request, or a POST request if
datais given.- Parameters:
- Returns:
Any – The decoded JSON response, or None for an allowed 404.
- Raises:
ReleaseError – If the request fails or the response is not valid JSON.
- Return type:
Any