mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 15:04:13 +08:00
only install comment server in tag mode
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user