mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-25 16:24:12 +08:00
feat: add unified update_claude_comment tool
- Add new update_claude_comment tool that automatically handles both issue and PR comments - Remove individual update_issue_comment and update_pull_request_comment tools - Pass CLAUDE_COMMENT_ID, GITHUB_EVENT_NAME, and IS_PR to MCP server environment - Simplify Claude's comment update workflow by removing need for owner/repo/commentId params - Update prompts and tests to use the new unified tool
This commit is contained in:
@@ -5,6 +5,7 @@ export async function prepareMcpConfig(
|
||||
owner: string,
|
||||
repo: string,
|
||||
branch: string,
|
||||
claudeCommentId?: string,
|
||||
): Promise<string> {
|
||||
try {
|
||||
const mcpConfig = {
|
||||
@@ -35,6 +36,9 @@ export async function prepareMcpConfig(
|
||||
REPO_NAME: repo,
|
||||
BRANCH_NAME: branch,
|
||||
REPO_DIR: process.env.GITHUB_WORKSPACE || process.cwd(),
|
||||
...(claudeCommentId && { CLAUDE_COMMENT_ID: claudeCommentId }),
|
||||
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || "",
|
||||
IS_PR: process.env.IS_PR || "false",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user