Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

964 B
Raw Blame
import { z } from "../openapi";

const giteaCredentials = {
  projectId: z.string().min(1),
  baseUrl: z.url(),
  accessToken: z.string().min(1),
};

export const listGiteaRepositoriesBody = z.object(giteaCredentials);

export const verifyGiteaBody = z.object({
  ...giteaCredentials,
  accessToken: z.string().min(1).optional().openapi({
    description:
      "Omit to verify with this project's saved token. The base URL must match the saved integration.",
  }),
  repositoryOwner: z.string().min(1),
  repositoryName: z.string().min(1),
});

export const createGiteaBody = z.object({
  baseUrl: z.string().min(1),
  accessToken: z.string().optional().openapi({
    description: "Omit to keep the token already stored for this project.",
  }),
  repositoryOwner: z.string().min(1),
  repositoryName: z.string().min(1),
});

export const updateGiteaBody = z.object({
  isActive: z.boolean().optional(),
  commentTaskLinkOnGiteaIssue: z.boolean().optional(),
});