GitHubInventory¶
- class neophile.inventory.github.GitHubInventory(config: Configuration, session: ClientSession)¶
Bases:
object
Inventory available tags of a GitHub repository.
- Parameters
config (
neophile.config.Configuration
) – neophile configuration.session (
aiohttp.ClientSession
) – The aiohttp client session to use to make requests for GitHub tags.
Methods Summary
inventory
(owner, repo[, semantic])Return the latest tag of a GitHub repository.
Methods Documentation
- async inventory(owner: str, repo: str, semantic: bool = False) Optional[str] ¶
Return the latest tag of a GitHub repository.
- Parameters
owner (
str
) – Owner of the repository.repo (
str
) – Name of the repository.semantic (
bool
, optional) – If set to true, only semantic versions will be considered and the latest version will be determined by semantic version sorting instead ofpackaging.version.Version
.
- Returns
result – The latest tag in sorted order. Tags that parse as valid versions sort before tags that do not, which should normally produce the correct results when version tags are mixed with other tags. If no valid tags are found or the repository doesn’t exist, returns
None
.- Return type