Skip to content

Commit

Permalink
chore: fix variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Jul 25, 2024
1 parent aff7b9a commit b13f632
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ai/backend/manager/container_registry/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ async def fetch_repositories(self, sess: aiohttp.ClientSession) -> AsyncIterator
self.registry_info["password"],
self.registry_info["gitlab_project"],
)
encoded_project_id = urllib.parse.quote(gitlab_project, safe="")

base_url = f"https://gitlab.com/api/v4/projects/{encoded_project_id}/registry/repositories"
encoded_project = urllib.parse.quote(gitlab_project, safe="")
repo_list_url = (
f"https://gitlab.com/api/v4/projects/{encoded_project}/registry/repositories"
)

headers = {
"Accept": "application/json",
Expand All @@ -31,9 +33,9 @@ async def fetch_repositories(self, sess: aiohttp.ClientSession) -> AsyncIterator

while True:
async with sess.get(
base_url,
repo_list_url,
headers=headers,
params={"per_page": 30, "page": page, "membership": "true"},
params={"per_page": 30, "page": page},
) as response:
if response.status == 200:
data = await response.json()
Expand Down

0 comments on commit b13f632

Please sign in to comment.