From 7953c1df30ae00e717df59ca38c74050d2f531f3 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 10 Apr 2022 00:30:47 +0200 Subject: [PATCH 1/5] fix: Missing install repositories GitHub --- src/routes/sources/[id]/_Github.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/sources/[id]/_Github.svelte b/src/routes/sources/[id]/_Github.svelte index 6b8aa0c89..a01746267 100644 --- a/src/routes/sources/[id]/_Github.svelte +++ b/src/routes/sources/[id]/_Github.svelte @@ -104,7 +104,7 @@ {/if} - {:else if source.githubAppId} + {:else if source.githubApp?.installationId}
General
From bb0c93dc2fe57b42c6d50564145ad7dcd602254b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 10 Apr 2022 00:31:10 +0200 Subject: [PATCH 2/5] fix: Return own and other sources better --- src/routes/applications/[id]/configuration/source.svelte | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/routes/applications/[id]/configuration/source.svelte b/src/routes/applications/[id]/configuration/source.svelte index e5c05ebdd..2f23de4d8 100644 --- a/src/routes/applications/[id]/configuration/source.svelte +++ b/src/routes/applications/[id]/configuration/source.svelte @@ -46,15 +46,12 @@ (source.type === 'github' && source.githubAppId && source.githubApp.installationId) || (source.type === 'gitlab' && source.gitlabAppId) ); + console.log(filteredSources); const ownSources = filteredSources.filter((source) => { - if (source.teams[0].id === $session.teamId) { - return source; - } + return source.teams.filter((team) => team.id === $session.teamId); }); const otherSources = filteredSources.filter((source) => { - if (source.teams[0].id !== $session.teamId) { - return source; - } + return source.teams.filter((team) => team.id !== $session.teamId); }); async function handleSubmit(gitSourceId) { From 41c5dd3b53dc7e6a2158727a3179c151e4c4fa44 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 10 Apr 2022 00:36:42 +0200 Subject: [PATCH 3/5] fix: Show config missing on sources --- src/routes/sources/index.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/sources/index.svelte b/src/routes/sources/index.svelte index 1e2d4d510..191eb8857 100644 --- a/src/routes/sources/index.svelte +++ b/src/routes/sources/index.svelte @@ -82,7 +82,8 @@ {#if $session.teamId === '0' && otherSources.length > 0}
{source.teams[0].name}
{/if} - {#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && !source.githubAppId && !source.githubApp?.installationId)} + + {#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && source.githubApp?.installationId === null)}
Configuration missing
@@ -109,7 +110,7 @@ {#if $session.teamId === '0'}
{source.teams[0].name}
{/if} - {#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && !source.githubAppId && !source.githubApp?.installationId)} + {#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && source.githubApp?.installationId === null)}
Configuration missing
From 73c9cb1d51db851b4d368d1eab46363185460e9c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 10 Apr 2022 00:39:50 +0200 Subject: [PATCH 4/5] Revert source configuration changes --- src/routes/applications/[id]/configuration/source.svelte | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/routes/applications/[id]/configuration/source.svelte b/src/routes/applications/[id]/configuration/source.svelte index 2f23de4d8..e5c05ebdd 100644 --- a/src/routes/applications/[id]/configuration/source.svelte +++ b/src/routes/applications/[id]/configuration/source.svelte @@ -46,12 +46,15 @@ (source.type === 'github' && source.githubAppId && source.githubApp.installationId) || (source.type === 'gitlab' && source.gitlabAppId) ); - console.log(filteredSources); const ownSources = filteredSources.filter((source) => { - return source.teams.filter((team) => team.id === $session.teamId); + if (source.teams[0].id === $session.teamId) { + return source; + } }); const otherSources = filteredSources.filter((source) => { - return source.teams.filter((team) => team.id !== $session.teamId); + if (source.teams[0].id !== $session.teamId) { + return source; + } }); async function handleSubmit(gitSourceId) { From b2e7435d0f6e3b9aad6189199c0b0a2d2175cd72 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 10 Apr 2022 00:40:12 +0200 Subject: [PATCH 5/5] chore: version++ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5bfd9fa40..a272908c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.4.1", + "version": "2.4.2", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev",