Merge pull request #243 from FedericoSchonborn/fix-gitlab-branch

Fix fetching GitLab snapshots on repos with no tags
This commit is contained in:
Jörg Thalheim 2024-04-23 13:26:44 +02:00 committed by GitHub
commit 220d547109
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,7 +52,10 @@ def fetch_gitlab_snapshots(url: ParseResult, branch: str) -> list[Version]:
resp = urllib.request.urlopen(gitlab_url)
commits = json.load(resp)
versions = fetch_gitlab_versions(url)
try:
versions = fetch_gitlab_versions(url)
except VersionError:
versions = []
latest_version = versions[0].number if versions else "0"
for commit in commits: