mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: remove giteaPathNamespace
This commit is contained in:
parent
5d5913f39d
commit
39f4a35cc8
@ -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", "");
|
||||
}}
|
||||
|
@ -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", "");
|
||||
}}
|
||||
|
@ -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
|
||||
|
@ -285,12 +285,6 @@
|
||||
"notNull": false,
|
||||
"default": "'/'"
|
||||
},
|
||||
"giteaPathNamespace": {
|
||||
"name": "giteaPathNamespace",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"bitbucketRepository": {
|
||||
"name": "bitbucketRepository",
|
||||
"type": "text",
|
||||
|
@ -423,7 +423,6 @@ export const applicationRouter = createTRPCRouter({
|
||||
applicationStatus: "idle",
|
||||
giteaId: input.giteaId,
|
||||
giteaProjectId: input.giteaProjectId,
|
||||
giteaPathNamespace: input.giteaPathNamespace,
|
||||
watchPaths: input.watchPaths,
|
||||
});
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user