- introduce updater.host
- allow dev branch
- minor improvements
This commit is contained in:
jrkb 2024-11-21 14:32:29 +01:00
parent cd6457352b
commit 2ba83ea3fe
2 changed files with 12 additions and 4 deletions

View file

@ -1740,11 +1740,15 @@ class ForgejoEngine:
"""Integration to Forgejo/Gitea API"""
def __init__(self):
self.api_url = 'https://git.pointer.click'
# the api_url may be overwritten by form_repo_url
# if updater.host is set
self.api_url = 'https://codeberg.org'
self.token = None
self.name = "forgejo"
def form_repo_url(self, updater):
if updater.host:
self.api_url = "https://" + updater.host
return "{}/api/v1/repos/{}/{}".format(self.api_url, updater.user, updater.repo)
def form_tags_url(self, updater):