project_config.fetchers.github module

Github files resources URIs fetcher.

project_config.fetchers.github._build_raw_githubusercontent_url(repo_owner: str, repo_name: str, git_reference: str, fpath: str) str[source]
project_config.fetchers.github._get_default_branch_from_git_repo(repo_owner: str, repo_name: str) str[source]
project_config.fetchers.github._get_default_branch_from_repo_branches_html(repo_owner: str, repo_name: str) Optional[str][source]
project_config.fetchers.github._get_default_branch_from_repo_github_api(repo_owner: str, repo_name: str) str[source]
project_config.fetchers.github.fetch(url_parts: urllib.parse.SplitResult, **kwargs: Any) str[source]

Fetch a resource through HTTPs protocol for a Github URI.

Parameters

url_parts (urllib.parse.SplitResult) – The URL parts of the URI.

Returns

The fetched resource content.

Return type

str

project_config.fetchers.github.resolve_url(url_parts: urllib.parse.SplitResult) str[source]

Resolve a gh: scheme URI to their real counterpart.

Parameters

url_parts (urllib.parse.SplitResult) – The URL parts of the URI.

Returns

The real https: scheme URL.

Return type

str