1
0
Fork 0

Strip the trailing / from project name.

This commit is contained in:
orhtej2 2024-09-16 11:53:53 +02:00 committed by Salamandar
parent 0754a17ea6
commit 1bbdbf1029

View file

@ -63,7 +63,7 @@ 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).rstrip("/") 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, "").strip("/")
self.project_id = self.find_project_id(self.project_path) self.project_id = self.find_project_id(self.project_path)
def get_forge_root(self, project_url: str) -> str: def get_forge_root(self, project_url: str) -> str: