From a205a7d5141f7e6e0fff89fbd090bd2f875a3aca Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 11 Aug 2022 08:28:09 +0000 Subject: [PATCH] fix: Enterprise Github instance endpoint --- apps/ui/src/routes/sources/[id]/_Github.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/ui/src/routes/sources/[id]/_Github.svelte b/apps/ui/src/routes/sources/[id]/_Github.svelte index fc638b2d8..82522092d 100644 --- a/apps/ui/src/routes/sources/[id]/_Github.svelte +++ b/apps/ui/src/routes/sources/[id]/_Github.svelte @@ -36,10 +36,14 @@ async function installRepositories(source: any) { const { htmlUrl } = source; + let endpoint = 'apps' + if (htmlUrl !== 'https://github.com') { + endpoint = 'github-apps' + } const left = screen.width / 2 - 1020 / 2; const top = screen.height / 2 - 1000 / 2; const newWindow = open( - `${htmlUrl}/apps/${source.githubApp.name}/installations/new`, + `${htmlUrl}/${endpoint}/${source.githubApp.name}/installations/new`, 'GitHub', 'resizable=1, scrollbars=1, fullscreen=0, height=1000, width=1020,top=' + top +