only install comment server in tag mode

This commit is contained in:
Ashwin Bhat
2025-08-08 08:22:29 -07:00
parent aeda2d62c0
commit af398fcc95

View File

@@ -73,21 +73,23 @@ export async function prepareMcpConfig(
}; };
// Always include comment server for updating Claude comments // Always include comment server for updating Claude comments
baseMcpConfig.mcpServers.github_comment = { if (context.inputs.mode === "tag") {
command: "bun", baseMcpConfig.mcpServers.github_comment = {
args: [ command: "bun",
"run", args: [
`${process.env.GITHUB_ACTION_PATH}/src/mcp/github-comment-server.ts`, "run",
], `${process.env.GITHUB_ACTION_PATH}/src/mcp/github-comment-server.ts`,
env: { ],
GITHUB_TOKEN: githubToken, env: {
REPO_OWNER: owner, GITHUB_TOKEN: githubToken,
REPO_NAME: repo, REPO_OWNER: owner,
...(claudeCommentId && { CLAUDE_COMMENT_ID: claudeCommentId }), REPO_NAME: repo,
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || "", ...(claudeCommentId && { CLAUDE_COMMENT_ID: claudeCommentId }),
GITHUB_API_URL: GITHUB_API_URL, GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || "",
}, GITHUB_API_URL: GITHUB_API_URL,
}; },
};
}
// Include file ops server when commit signing is enabled // Include file ops server when commit signing is enabled
if (context.inputs.useCommitSigning) { if (context.inputs.useCommitSigning) {