mirror of
https://github.com/markwylde/claude-code-gitea-action.git
synced 2026-08-22 08:15:05 +08:00
feat: add mode-aware gitea prepare flow
This commit is contained in:
@@ -942,7 +942,7 @@ server.tool(
|
||||
endpoint += `?style=${style}`;
|
||||
}
|
||||
|
||||
const result = await giteaRequest(endpoint, "POST");
|
||||
await giteaRequest(endpoint, "POST");
|
||||
|
||||
return {
|
||||
content: [
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user