Merge pull request #2039 from Salamandar/fix_double_slash
autoupdater: Fix double slash in gitlab and gitea forges
This commit is contained in:
commit
1b39a34a4c
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ class GithubAPI:
|
||||||
class GitlabAPI:
|
class GitlabAPI:
|
||||||
def __init__(self, upstream: str):
|
def __init__(self, upstream: str):
|
||||||
# Find gitlab api root...
|
# Find gitlab api root...
|
||||||
self.forge_root = self.get_forge_root(upstream)
|
self.forge_root = self.get_forge_root(upstream).rstrip("/")
|
||||||
self.project_path = upstream.replace(self.forge_root, "").lstrip("/")
|
self.project_path = upstream.replace(self.forge_root, "").lstrip("/")
|
||||||
self.project_id = self.find_project_id(self.project_path)
|
self.project_id = self.find_project_id(self.project_path)
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ class GitlabAPI:
|
||||||
class GiteaForgejoAPI:
|
class GiteaForgejoAPI:
|
||||||
def __init__(self, upstream: str):
|
def __init__(self, upstream: str):
|
||||||
# Find gitea/forgejo api root...
|
# Find gitea/forgejo api root...
|
||||||
self.forge_root = self.get_forge_root(upstream)
|
self.forge_root = self.get_forge_root(upstream).rstrip("/")
|
||||||
self.project_path = upstream.replace(self.forge_root, "").lstrip("/")
|
self.project_path = upstream.replace(self.forge_root, "").lstrip("/")
|
||||||
|
|
||||||
def get_forge_root(self, project_url: str) -> str:
|
def get_forge_root(self, project_url: str) -> str:
|
||||||
|
|
Loading…
Reference in a new issue