From 9bc6411c98e0fc8ecf6465c92d9831126186b726 Mon Sep 17 00:00:00 2001 From: rainwashed <60084007+rainwashed@users.noreply.github.com> Date: Mon, 28 Jul 2025 17:05:30 -0400 Subject: [PATCH 1/2] fix: github app creation name conflicting with already existing Dokploy-Time names appended a 5-char random string to the name creation as to prevent conflicts with other existing Dokploy GitHub apps. --- .../settings/git/github/add-github-provider.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 af7d58544..3b22bc7af 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 @@ -24,12 +24,14 @@ export const AddGithubProvider = () => { const [isOrganization, setIsOrganization] = useState(false); const [organizationName, setOrganization] = useState(""); + const randomString = () => Math.random().toString(36).slice(2, 8); + useEffect(() => { const url = document.location.origin; const manifest = JSON.stringify( { redirect_url: `${origin}/api/providers/github/setup?organizationId=${activeOrganization?.id}&userId=${session?.user?.id}`, - name: `Dokploy-${format(new Date(), "yyyy-MM-dd")}`, + name: `Dokploy-${format(new Date(), "yyyy-MM-dd")}-${randomString()}`, url: origin, hook_attributes: { url: `${url}/api/deploy/github`, @@ -118,11 +120,10 @@ export const AddGithubProvider = () => { : "https://github.com/settings/installations" } className={`text-muted-foreground text-sm hover:underline duration-300 - ${ - isOrganization && !organizationName - ? "pointer-events-none opacity-50" - : "" - }`} + ${isOrganization && !organizationName + ? "pointer-events-none opacity-50" + : "" + }`} target="_blank" rel="noopener noreferrer" > From 0bcc59f90faf37feb3982622ea7f3900198f0bb6 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sat, 2 Aug 2025 06:19:09 +0000 Subject: [PATCH 2/2] [autofix.ci] apply automated fixes --- .../settings/git/github/add-github-provider.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 3b22bc7af..83a4c8b42 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 @@ -120,10 +120,11 @@ export const AddGithubProvider = () => { : "https://github.com/settings/installations" } className={`text-muted-foreground text-sm hover:underline duration-300 - ${isOrganization && !organizationName - ? "pointer-events-none opacity-50" - : "" - }`} + ${ + isOrganization && !organizationName + ? "pointer-events-none opacity-50" + : "" + }`} target="_blank" rel="noopener noreferrer" >