Attempt to make this work

This commit is contained in:
Mark Wylde
2025-05-31 00:56:07 +01:00
parent ea134ca929
commit 5171232878
8 changed files with 300 additions and 137 deletions

View File

@@ -10,10 +10,16 @@ export async function prepareMcpConfig(
console.log(`[MCP-INSTALL] Owner: ${owner}`);
console.log(`[MCP-INSTALL] Repo: ${repo}`);
console.log(`[MCP-INSTALL] Branch: ${branch}`);
console.log(`[MCP-INSTALL] GitHub token: ${githubToken ? '***' : 'undefined'}`);
console.log(`[MCP-INSTALL] GITHUB_ACTION_PATH: ${process.env.GITHUB_ACTION_PATH}`);
console.log(`[MCP-INSTALL] GITHUB_WORKSPACE: ${process.env.GITHUB_WORKSPACE}`);
console.log(
`[MCP-INSTALL] GitHub token: ${githubToken ? "***" : "undefined"}`,
);
console.log(
`[MCP-INSTALL] GITHUB_ACTION_PATH: ${process.env.GITHUB_ACTION_PATH}`,
);
console.log(
`[MCP-INSTALL] GITHUB_WORKSPACE: ${process.env.GITHUB_WORKSPACE}`,
);
try {
const mcpConfig = {
mcpServers: {
@@ -29,7 +35,8 @@ export async function prepareMcpConfig(
REPO_NAME: repo,
BRANCH_NAME: branch,
REPO_DIR: process.env.GITHUB_WORKSPACE || process.cwd(),
GITEA_API_URL: process.env.GITEA_API_URL || "https://api.github.com",
GITEA_API_URL:
process.env.GITEA_API_URL || "https://api.github.com",
},
},
local_git_ops: {
@@ -55,7 +62,7 @@ export async function prepareMcpConfig(
console.log("[MCP-INSTALL] Generated MCP configuration:");
console.log(configString);
console.log("[MCP-INSTALL] MCP config generation completed successfully");
return configString;
} catch (error) {
console.error("[MCP-INSTALL] MCP config generation failed:", error);