Skip to content

Commit afa6e98

Browse files
committed
Fix repo_url
Signed-off-by: Keshav Priyadarshi <[email protected]>
1 parent b5fc0af commit afa6e98

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scanpipe/pipes/federatedcode.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ def create_repository(repo_name, clone_path, logger, shallow_clone=True):
199199
Create and initialize remote FederatedCode `repo_name` repository,
200200
perform local checkout, and return it.
201201
"""
202-
account_url = settings.FEDERATEDCODE_GIT_ACCOUNT_URL
202+
account_url = f"{settings.FEDERATEDCODE_GIT_ACCOUNT_URL}/"
203203
repo_url = urljoin(account_url, repo_name)
204+
204205
headers = {
205206
"Authorization": f"token {settings.FEDERATEDCODE_GIT_SERVICE_TOKEN}",
206207
"Accept": "application/vnd.github+json",
@@ -239,7 +240,8 @@ def get_or_create_repository(repo_name, working_path, logger, shallow_clone=True
239240
- If the remote repository does not exist, create and initialize `repo_name`
240241
repository, perform local checkout, and return it.
241242
"""
242-
repo_url = urljoin(settings.FEDERATEDCODE_GIT_ACCOUNT_URL, repo_name)
243+
account_url = f"{settings.FEDERATEDCODE_GIT_ACCOUNT_URL}/"
244+
repo_url = urljoin(account_url, repo_name)
243245
clone_path = working_path / repo_name
244246

245247
if clone_path.exists():

0 commit comments

Comments
 (0)