Skip to content

Commit f2b214f

Browse files
authored
Merge pull request #2266 from rainwashed/canary
fix: github app creation name conflicting with already existing Dokploy names
2 parents 7ae4bf3 + 0bcc59f commit f2b214f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ export const AddGithubProvider = () => {
2424
const [isOrganization, setIsOrganization] = useState(false);
2525
const [organizationName, setOrganization] = useState("");
2626

27+
const randomString = () => Math.random().toString(36).slice(2, 8);
28+
2729
useEffect(() => {
2830
const url = document.location.origin;
2931
const manifest = JSON.stringify(
3032
{
3133
redirect_url: `${origin}/api/providers/github/setup?organizationId=${activeOrganization?.id}&userId=${session?.user?.id}`,
32-
name: `Dokploy-${format(new Date(), "yyyy-MM-dd")}`,
34+
name: `Dokploy-${format(new Date(), "yyyy-MM-dd")}-${randomString()}`,
3335
url: origin,
3436
hook_attributes: {
3537
url: `${url}/api/deploy/github`,

0 commit comments

Comments
 (0)