fix - allowed and disallowed tools ignored in agent mode (#424)

This commit is contained in:
Matthew Burke
2025-08-08 16:34:55 -05:00
committed by GitHub
parent bc423b47f5
commit 8a5d751740
4 changed files with 84 additions and 16 deletions

View File

@@ -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

View File

@@ -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({