feat: adapt pullfrog for gitea + ollama

This commit is contained in:
2026-05-31 01:01:00 -05:00
parent 36ac64a5b6
commit 2aca1a3aa3
183 changed files with 1419 additions and 28292 deletions
+23
View File
@@ -0,0 +1,23 @@
import { Gitea } from "@go-gitea/sdk.js";
import type { GiteaEndpoints } from "@go-gitea/sdk.js";
export { Gitea };
export type { GiteaEndpoints };
// The SDK's ChangedFile type omits `patch`. Gitea does return it; cast to this when needed.
export interface ChangedFileWithPatch {
filename?: string;
status?: string;
additions?: number;
deletions?: number;
changes?: number;
patch?: string;
[key: string]: unknown;
}
export function createGiteaClient(): Gitea {
const baseUrl = (process.env.GITEA_URL ?? "https://git.shockvpn.com").replace(/\/$/, "");
const token = process.env.BOT_TOKEN;
if (!token) throw new Error("BOT_TOKEN environment variable is required");
return new Gitea({ baseUrl, auth: token });
}