mainframe.rules¶
Attributes¶
Classes¶
Functions¶
|
Build authentication headers given the access token |
|
Fetch the top commit hash of the given repository |
|
Parse a zipfile and return a dict mapping filenames to content |
|
Download the source zipfile from GitHub for the given repository |
|
Return the commit hash and all the rules |
Module Contents¶
- mainframe.rules.build_auth_header(access_token: str) dict[str, str] [source]¶
Build authentication headers given the access token
- mainframe.rules.fetch_commit_hash(http_client: httpx.Client, *, repository: str, access_token: str) str [source]¶
Fetch the top commit hash of the given repository
- mainframe.rules.parse_zipfile(zipfile: zipfile.ZipFile) dict[str, str] [source]¶
Parse a zipfile and return a dict mapping filenames to content
- mainframe.rules.fetch_zipfile(http_client: httpx.Client, *, repository: str, access_token: str) zipfile.ZipFile [source]¶
Download the source zipfile from GitHub for the given repository