Refactor Gitea integration: remove giteaProjectId references and update related schemas. Add new fields for gitea repository details in application tests and components.

This commit is contained in:
Mauricio Siu
2025-03-29 14:44:33 -06:00
parent fe967239b4
commit 55328468d1
12 changed files with 5391 additions and 83 deletions

View File

@@ -158,7 +158,6 @@ export const applications = pgTable("application", {
gitlabBuildPath: text("gitlabBuildPath").default("/"),
gitlabPathNamespace: text("gitlabPathNamespace"),
// Gitea
giteaProjectId: integer("giteaProjectId"),
giteaRepository: text("giteaRepository"),
giteaOwner: text("giteaOwner"),
giteaBranch: text("giteaBranch"),
@@ -508,7 +507,6 @@ export const apiSaveGiteaProvider = createSchema
giteaOwner: true,
giteaRepository: true,
giteaId: true,
giteaProjectId: true,
watchPaths: true,
})
.required();

View File

@@ -65,7 +65,6 @@ export const apiGiteaTestConnection = createSchema
export type ApiGiteaTestConnection = z.infer<typeof apiGiteaTestConnection>;
export const apiFindGiteaBranches = z.object({
id: z.number().optional(),
owner: z.string().min(1),
repositoryName: z.string().min(1),
giteaId: z.string().optional(),

View File

@@ -413,7 +413,6 @@ export const getGiteaRepositories = async (giteaId?: string) => {
};
export const getGiteaBranches = async (input: {
id?: number;
giteaId?: string;
owner: string;
repo: string;
@@ -448,5 +447,11 @@ export const getGiteaBranches = async (input: {
commit: {
id: branch.commit.id,
},
}));
})) as {
id: string;
name: string;
commit: {
id: string;
};
}[];
};