From f5674f5bf8657668754f898356cdd61f31ba4e6c Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 28 Feb 2026 11:06:45 -0600 Subject: [PATCH 1/8] fix: handle optional chaining for organization and user IDs in GitHub provider setup --- .../settings/git/github/add-github-provider.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx b/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx index 010ae25e7..510a0c7f6 100644 --- a/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx +++ b/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx @@ -30,7 +30,7 @@ export const AddGithubProvider = () => { const url = document.location.origin; const manifest = JSON.stringify( { - redirect_url: `${origin}/api/providers/github/setup?organizationId=${activeOrganization?.id}&userId=${session?.user?.id}`, + redirect_url: `${origin}/api/providers/github/setup?organizationId=${activeOrganization?.id ?? ""}&userId=${session?.user?.id ?? ""}`, name: `Dokploy-${format(new Date(), "yyyy-MM-dd")}-${randomString()}`, url: origin, hook_attributes: { @@ -52,7 +52,7 @@ export const AddGithubProvider = () => { ); setManifest(manifest); - }, [data?.id]); + }, [data?.id, activeOrganization?.id, session?.user?.id]); return ( @@ -131,7 +131,11 @@ export const AddGithubProvider = () => { Unsure if you already have an app?