Skip to content

Commit

Permalink
Get latest release from correct repo
Browse files Browse the repository at this point in the history
  • Loading branch information
lord-haffi committed May 15, 2024
1 parent 642cac3 commit 3613f0f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/compatibility/versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

import click
from bost.pull import get_source_repo
from github import Github
from github.Auth import Token
from github.GitRelease import GitRelease
from more_itertools import one
from pydantic import BaseModel, ConfigDict
Expand Down Expand Up @@ -130,7 +132,11 @@ def get_latest_version(gh_token: str | None = None) -> Version:
"""
Get the release from BO4E-python repository which is marked as 'latest'.
"""
return Version.from_string(get_source_repo(gh_token).get_latest_release().tag_name)
if gh_token is not None:
gh = Github(auth=Token(gh_token))
else:
gh = Github()
return Version.from_string(gh.get_repo("bo4e/BO4E-python").get_latest_release().tag_name)


def get_last_n_tags(n: int, *, on_branch: str = "main", exclude_candidates: bool = True) -> Iterable[str]:
Expand Down

0 comments on commit 3613f0f

Please sign in to comment.