refactor: update remote tag fetching behaviour so it uses api instead of shallow clone

This commit is contained in:
Jonathan Teran Carballo
2026-09-21 09:15:48 -03:00
parent eabef5eb33
commit 22ba8f5e5f
7 changed files with 89 additions and 14 deletions
+7
View File
@@ -70,6 +70,13 @@ class GitlabRemoteAPI(RemoteAPI):
for c in items
]
def list_tags(self, suffix: str = "") -> list[str]:
# "search" soporta "$" para anclar al final del nombre
params = {"search": suffix + "$"} if suffix else None
tags = self.get_all_pages(self.get_endpoint("/repository/tags"), 100, params)
return [t["name"] for t in tags]
def get_endpoint(self, resource: str) -> str:
project_id = quote(self.repository, safe="")
return f"{self.base_url}/api/v4/projects/{project_id}{resource}"