Files
multica/packages/core/vcs/queries.ts
dixonl90 581d9527ba feat(vcs): self-hosted Git providers (Forgejo, Gitea, GitLab) alongside GitHub (MUL-3772) (#5006)
Adds self-hosted Git provider support (Forgejo, Gitea, GitLab) alongside GitHub:
per-workspace token connection, a provider-dispatched webhook, PR/MR and CI
mirroring, and the shared issue auto-link / auto-close machinery. Off until
MULTICA_VCS_SECRET_KEY is set, so existing deployments are unaffected.

Co-authored-by: Bohan <bohan@devv.ai>
2026-07-24 15:01:27 +08:00

15 lines
433 B
TypeScript

import { queryOptions } from "@tanstack/react-query";
import { api } from "../api";
export const vcsKeys = {
all: (wsId: string) => ["vcs", wsId] as const,
connections: (wsId: string) => [...vcsKeys.all(wsId), "connections"] as const,
};
export const vcsConnectionsOptions = (wsId: string) =>
queryOptions({
queryKey: vcsKeys.connections(wsId),
queryFn: () => api.listVCSConnections(wsId),
enabled: !!wsId,
});