uptainer.providers.github¶
- class uptainer.providers.github.GitHub(log: BoundLoggerLazyProxy)[source]¶
Bases:
BaseProvider- __init__(log: BoundLoggerLazyProxy) None[source]¶
GitHub provider for getting the information from it.
- Parameters:
log (BoundLoggerLazyProxy) – Log class to inject into the vars. Class: structlog
- Returns:
None
- get_image_versions(parent: str, project: str) TyperImageVersion[source]¶
Query the Github API in order to get the images version availables and return a list of it.
- Parameters:
parent (str) – User or Orgs on Github
project (str) – Project Name on GitHub
- Returns:
{“error”: <bool>, “data”: [{“last_update”: “<datetime object>”, “name”: [‘<version1>’, …]},]}
- Return type:
Return a dict that have image metadata like
- get_metadata(image_repository: str) TyperMetadata[source]¶
Getting the GitHub metadata like user and orgs.
- Parameters:
image_repository (str) – Url on ghcr in order to detect the needed data.
- Returns:
{“error”: <bool>, “data”: {“parent”: “<organization name or user>”, “project”: “<project name>”}}
- Return type:
Return a dict that have image metadata like