mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
fix - allowed and disallowed tools ignored in agent mode (#424)
This commit is contained in:
@@ -80,9 +80,8 @@ export const agentMode: Mode = {
|
||||
...context.inputs.disallowedTools,
|
||||
];
|
||||
|
||||
// Export as INPUT_ prefixed variables for the base action
|
||||
core.exportVariable("INPUT_ALLOWED_TOOLS", allowedTools.join(","));
|
||||
core.exportVariable("INPUT_DISALLOWED_TOOLS", disallowedTools.join(","));
|
||||
core.exportVariable("ALLOWED_TOOLS", allowedTools.join(","));
|
||||
core.exportVariable("DISALLOWED_TOOLS", disallowedTools.join(","));
|
||||
|
||||
// Agent mode uses a minimal MCP configuration
|
||||
// We don't need comment servers or PR-specific tools for automation
|
||||
|
||||
@@ -297,9 +297,8 @@ This ensures users get value from the review even before checking individual inl
|
||||
...context.inputs.disallowedTools,
|
||||
];
|
||||
|
||||
// Export as INPUT_ prefixed variables for the base action
|
||||
core.exportVariable("INPUT_ALLOWED_TOOLS", allowedTools.join(","));
|
||||
core.exportVariable("INPUT_DISALLOWED_TOOLS", disallowedTools.join(","));
|
||||
core.exportVariable("ALLOWED_TOOLS", allowedTools.join(","));
|
||||
core.exportVariable("DISALLOWED_TOOLS", disallowedTools.join(","));
|
||||
|
||||
const additionalMcpConfig = process.env.MCP_CONFIG || "";
|
||||
const mcpConfig = await prepareMcpConfig({
|
||||
|
||||
Reference in New Issue
Block a user