diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-gitea-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-gitea-provider.tsx index 53e8cd9d..ded2f2f4 100644 --- a/apps/dokploy/components/dashboard/application/general/generic/save-gitea-provider.tsx +++ b/apps/dokploy/components/dashboard/application/general/generic/save-gitea-provider.tsx @@ -67,7 +67,6 @@ const GiteaProviderSchema = z.object({ .object({ repo: z.string().min(1, "Repo is required"), owner: z.string().min(1, "Owner is required"), - giteaPathNamespace: z.string().min(1), id: z.number().nullable().optional(), }) .required(), @@ -95,7 +94,6 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => { repository: { owner: "", repo: "", - giteaPathNamespace: "", id: null, }, giteaId: "", @@ -144,7 +142,6 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => { repository: { repo: data.giteaRepository || "", owner: data.giteaOwner || "", - giteaPathNamespace: data.giteaPathNamespace || "", id: data.giteaProjectId || null, // Handle null case explicitly }, buildPath: data.giteaBuildPath || "/", @@ -163,7 +160,6 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => { giteaId: data.giteaId, applicationId, giteaProjectId: data.repository.id || null, // Handle null case explicitly - giteaPathNamespace: data.repository.giteaPathNamespace, watchPaths: data.watchPaths, }) .then(async () => { @@ -197,7 +193,6 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => { owner: "", repo: "", id: null, - giteaPathNamespace: "", }); form.setValue("branch", ""); }} @@ -283,7 +278,6 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => { owner: repo.owner.username as string, repo: repo.name, id: repo.id, - giteaPathNamespace: repo.name, }); form.setValue("branch", ""); }} diff --git a/apps/dokploy/components/dashboard/compose/general/generic/save-gitea-provider-compose.tsx b/apps/dokploy/components/dashboard/compose/general/generic/save-gitea-provider-compose.tsx index 6618f7e0..052ffa86 100644 --- a/apps/dokploy/components/dashboard/compose/general/generic/save-gitea-provider-compose.tsx +++ b/apps/dokploy/components/dashboard/compose/general/generic/save-gitea-provider-compose.tsx @@ -55,7 +55,6 @@ const GiteaProviderSchema = z.object({ repo: z.string().min(1, "Repo is required"), owner: z.string().min(1, "Owner is required"), id: z.number().nullable(), - giteaPathNamespace: z.string(), }) .required(), branch: z.string().min(1, "Branch is required"), @@ -82,7 +81,6 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => { repository: { owner: "", repo: "", - giteaPathNamespace: "", id: null, }, giteaId: "", @@ -146,7 +144,6 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => { repo: data.giteaRepository || "", owner: data.giteaOwner || "", id: currentRepo?.id || null, - giteaPathNamespace: currentRepo?.url || "", }, composePath: data.composePath, giteaId: data.giteaId || "", @@ -198,7 +195,6 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => { form.setValue("repository", { owner: "", repo: "", - giteaPathNamespace: "", id: null, }); form.setValue("branch", ""); @@ -289,7 +285,6 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => { owner: repo.owner.username, repo: repo.name, id: repo.id, - giteaPathNamespace: repo.url, }); form.setValue("branch", ""); }} diff --git a/apps/dokploy/drizzle/0079_bizarre_wendell_rand.sql b/apps/dokploy/drizzle/0079_bizarre_wendell_rand.sql index 933a65e3..f13d1288 100644 --- a/apps/dokploy/drizzle/0079_bizarre_wendell_rand.sql +++ b/apps/dokploy/drizzle/0079_bizarre_wendell_rand.sql @@ -21,7 +21,6 @@ ALTER TABLE "application" ADD COLUMN "giteaRepository" text;--> statement-breakp ALTER TABLE "application" ADD COLUMN "giteaOwner" text;--> statement-breakpoint ALTER TABLE "application" ADD COLUMN "giteaBranch" text;--> statement-breakpoint ALTER TABLE "application" ADD COLUMN "giteaBuildPath" text DEFAULT '/';--> statement-breakpoint -ALTER TABLE "application" ADD COLUMN "giteaPathNamespace" text;--> statement-breakpoint ALTER TABLE "application" ADD COLUMN "giteaId" text;--> statement-breakpoint ALTER TABLE "compose" ADD COLUMN "giteaRepository" text;--> statement-breakpoint ALTER TABLE "compose" ADD COLUMN "giteaOwner" text;--> statement-breakpoint diff --git a/apps/dokploy/drizzle/meta/0079_snapshot.json b/apps/dokploy/drizzle/meta/0079_snapshot.json index fe64df56..12ea7ec5 100644 --- a/apps/dokploy/drizzle/meta/0079_snapshot.json +++ b/apps/dokploy/drizzle/meta/0079_snapshot.json @@ -285,12 +285,6 @@ "notNull": false, "default": "'/'" }, - "giteaPathNamespace": { - "name": "giteaPathNamespace", - "type": "text", - "primaryKey": false, - "notNull": false - }, "bitbucketRepository": { "name": "bitbucketRepository", "type": "text", diff --git a/apps/dokploy/server/api/routers/application.ts b/apps/dokploy/server/api/routers/application.ts index fcf19806..4f74e60a 100644 --- a/apps/dokploy/server/api/routers/application.ts +++ b/apps/dokploy/server/api/routers/application.ts @@ -423,7 +423,6 @@ export const applicationRouter = createTRPCRouter({ applicationStatus: "idle", giteaId: input.giteaId, giteaProjectId: input.giteaProjectId, - giteaPathNamespace: input.giteaPathNamespace, watchPaths: input.watchPaths, }); diff --git a/packages/server/src/db/schema/application.ts b/packages/server/src/db/schema/application.ts index aed811e0..729c88d7 100644 --- a/packages/server/src/db/schema/application.ts +++ b/packages/server/src/db/schema/application.ts @@ -163,7 +163,6 @@ export const applications = pgTable("application", { giteaOwner: text("giteaOwner"), giteaBranch: text("giteaBranch"), giteaBuildPath: text("giteaBuildPath").default("/"), - giteaPathNamespace: text("giteaPathNamespace"), // Bitbucket bitbucketRepository: text("bitbucketRepository"), bitbucketOwner: text("bitbucketOwner"), @@ -510,7 +509,6 @@ export const apiSaveGiteaProvider = createSchema giteaRepository: true, giteaId: true, giteaProjectId: true, - giteaPathNamespace: true, watchPaths: true, }) .required(); diff --git a/packages/server/src/utils/providers/gitea.ts b/packages/server/src/utils/providers/gitea.ts index d05ab8d9..eec59b1e 100644 --- a/packages/server/src/utils/providers/gitea.ts +++ b/packages/server/src/utils/providers/gitea.ts @@ -17,16 +17,14 @@ export const getErrorCloneRequirements = (entity: { giteaRepository?: string | null; giteaOwner?: string | null; giteaBranch?: string | null; - giteaPathNamespace?: string | null; }) => { const reasons: string[] = []; - const { giteaBranch, giteaOwner, giteaRepository, giteaPathNamespace } = + const { giteaBranch, giteaOwner, giteaRepository } = entity; if (!giteaRepository) reasons.push("1. Repository not assigned."); if (!giteaOwner) reasons.push("2. Owner not specified."); if (!giteaBranch) reasons.push("3. Branch not defined."); - if (!giteaPathNamespace) reasons.push("4. Path namespace not defined."); return reasons; };