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:
Ashwin Bhat
2025-05-30 07:47:17 -07:00
parent e409c57d90
commit 722b06e99b
5 changed files with 151 additions and 51 deletions

View File

@@ -85,13 +85,14 @@ async function run() {
// Step 11: Get MCP configuration
const additionalMcpConfig = process.env.MCP_CONFIG || "";
const mcpConfig = await prepareMcpConfig(
const mcpConfig = await prepareMcpConfig({
githubToken,
context.repository.owner,
context.repository.repo,
branchInfo.currentBranch,
owner: context.repository.owner,
repo: context.repository.repo,
branch: branchInfo.currentBranch,
additionalMcpConfig,
);
claudeCommentId: commentId.toString(),
});
core.setOutput("mcp_config", mcpConfig);
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error);