prometa.git package
Subpackages
- prometa.git.gitlab package
- Subpackages
- prometa.git.gitlab.badges package
- Subpackages
- Submodules
- prometa.git.gitlab.badges.badge_manager module
- prometa.git.gitlab.badges.common module
- prometa.git.gitlab.badges.latest_release module
- prometa.git.gitlab.badges.license module
- prometa.git.gitlab.badges.pipeline_status module
- prometa.git.gitlab.badges.test_coverage module
- Module contents
- prometa.git.gitlab.ci package
- prometa.git.gitlab.hooks package
- prometa.git.gitlab.badges package
- Submodules
- prometa.git.gitlab.api module
- prometa.git.gitlab.host module
- Module contents
- Subpackages
Submodules
prometa.git.host module
Base class for Git hosts.
- class prometa.git.host.GitHost(project)[source]
Bases:
Registrable
Base class for Git hosts.
- classmethod get_primary_host(project)[source]
Get the primary Git host of a project.
- Parameters:
project – A Project instance.
- Returns:
A GitHost subclass instance, or None if no host was found.
- property is_used[source]
Check if the configuration indicates that this project uses this host.
- Parameters:
project – A Project instance.
- Returns:
True if the project is configured to use this host, else False.
prometa.git.repo module
Common Git functions.
- class prometa.git.repo.GitRepo(path, remote='origin')[source]
Bases:
object
Basic functionality for retrieving Git information.
- __init__(path, remote='origin')[source]
- Parameters:
path – A path to the Git repository or any non-submodule path within it.
remote – The remote repository name to use for generating URLs.
- get_section_url(section)[source]
The URL to one of the various GitLab sections, e.g. “blob/main” or “packages”.
Module contents
Package stub.
- class prometa.git.GitHost(project)[source]
Bases:
Registrable
Base class for Git hosts.
- classmethod get_primary_host(project)[source]
Get the primary Git host of a project.
- Parameters:
project – A Project instance.
- Returns:
A GitHost subclass instance, or None if no host was found.
- property is_used[source]
Check if the configuration indicates that this project uses this host.
- Parameters:
project – A Project instance.
- Returns:
True if the project is configured to use this host, else False.
- class prometa.git.GitRepo(path, remote='origin')[source]
Bases:
object
Basic functionality for retrieving Git information.
- __init__(path, remote='origin')[source]
- Parameters:
path – A path to the Git repository or any non-submodule path within it.
remote – The remote repository name to use for generating URLs.
- get_section_url(section)[source]
The URL to one of the various GitLab sections, e.g. “blob/main” or “packages”.