feat: add mode-aware gitea prepare flow

This commit is contained in:
Mark Wylde
2025-09-30 17:31:36 +01:00
parent 582a02ee24
commit 3305a16297
13 changed files with 404 additions and 120 deletions
+1 -1
View File
@@ -942,7 +942,7 @@ server.tool(
endpoint += `?style=${style}`;
}
const result = await giteaRequest(endpoint, "POST");
await giteaRequest(endpoint, "POST");
return {
content: [
+19 -6
View File
@@ -1,11 +1,24 @@
import * as core from "@actions/core";
import type { ParsedGitHubContext } from "../github/context";
export async function prepareMcpConfig(
githubToken: string,
owner: string,
repo: string,
branch: string,
): Promise<string> {
export type PrepareMcpConfigOptions = {
githubToken: string;
owner: string;
repo: string;
branch: string;
baseBranch?: string;
allowedTools?: string[];
context?: ParsedGitHubContext;
overrideConfig?: string;
additionalMcpConfig?: string;
};
export async function prepareMcpConfig({
githubToken,
owner,
repo,
branch,
}: PrepareMcpConfigOptions): Promise<string> {
console.log("[MCP-INSTALL] Preparing MCP configuration...");
console.log(`[MCP-INSTALL] Owner: ${owner}`);
console.log(`[MCP-INSTALL] Repo: ${repo}`);
-2
View File
@@ -3,8 +3,6 @@
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import { readFile, writeFile } from "fs/promises";
import { join } from "path";
import { execSync } from "child_process";
// Get repository information from environment variables