mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
feat: add inline comment tool to allowed tools for code-review plugin
When the code-review@claude-code-plugins plugin is specified in agent mode for PRs, automatically add mcp__github_inline_comment__create_inline_comment to the allowed tools list. This ensures Claude can use the inline comment tool once the MCP server is enabled. Changes: - Check for code-review plugin in agent mode prepare - Add inline comment tool to allowed tools for PR contexts - Tool is only added when both plugin is present and context is a PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -114,6 +114,14 @@ export const agentMode: Mode = {
|
||||
const userClaudeArgs = process.env.CLAUDE_ARGS || "";
|
||||
const allowedTools = parseAllowedTools(userClaudeArgs);
|
||||
|
||||
// Add inline comment tool if code-review plugin is present
|
||||
const hasCodeReviewPlugin = context.inputs.plugins.includes(
|
||||
"code-review@claude-code-plugins",
|
||||
);
|
||||
if (hasCodeReviewPlugin && isEntityContext(context) && context.isPR) {
|
||||
allowedTools.push("mcp__github_inline_comment__create_inline_comment");
|
||||
}
|
||||
|
||||
// Check for branch info from environment variables (useful for auto-fix workflows)
|
||||
const claudeBranch = process.env.CLAUDE_BRANCH || undefined;
|
||||
const baseBranch =
|
||||
|
||||
Reference in New Issue
Block a user