From 9f63c645ff7f0a4462e1ec7cc505971a0d37af56 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 4 Nov 2022 09:53:57 +0100 Subject: [PATCH] fix: load public repos --- .../[id]/configuration/_PublicRepository.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/ui/src/routes/applications/[id]/configuration/_PublicRepository.svelte b/apps/ui/src/routes/applications/[id]/configuration/_PublicRepository.svelte index 32d5627d9..49e8bcee5 100644 --- a/apps/ui/src/routes/applications/[id]/configuration/_PublicRepository.svelte +++ b/apps/ui/src/routes/applications/[id]/configuration/_PublicRepository.svelte @@ -39,6 +39,9 @@ if (branch[0] === 'tree' && branch[1]) { branchName = branch[1]; } + if (branch.length === 1) { + branchName = branch[0] + } } if (host === 'gitlab.com') { host = 'gitlab.com/api/v4'; @@ -46,6 +49,9 @@ if (branch[1] === 'tree' && branch[2]) { branchName = branch[2]; } + if (branch.length === 1) { + branchName = branch[0] + } } const apiUrl = `${protocol}://${host}`; if (type === 'github') { @@ -165,7 +171,7 @@ placeholder="eg: https://github.com/coollabsio/nodejs-example/tree/main" bind:value={publicRepositoryLink} /> -