mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
Fix MCP config not being passed to Claude CLI
The MCP servers (including github_comment server) were configured but not passed to Claude. This caused the "update_claude_comment" tool to be unavailable. Changes: - Write MCP config to a file at $RUNNER_TEMP/claude-mcp-config.json - Add mcp_config_file output from prepare.ts - Pass MCP config file via --mcp-config flag in claude_args - Use fs/promises writeFile to match codebase conventions
This commit is contained in:
@@ -27,8 +27,8 @@ const defaultRepository = {
|
||||
full_name: "test-owner/test-repo",
|
||||
};
|
||||
|
||||
type MockContextOverrides = Omit<Partial<ParsedGitHubContext>, 'inputs'> & {
|
||||
inputs?: Partial<ParsedGitHubContext['inputs']>;
|
||||
type MockContextOverrides = Omit<Partial<ParsedGitHubContext>, "inputs"> & {
|
||||
inputs?: Partial<ParsedGitHubContext["inputs"]>;
|
||||
};
|
||||
|
||||
export const createMockContext = (
|
||||
@@ -46,15 +46,15 @@ export const createMockContext = (
|
||||
inputs: defaultInputs,
|
||||
};
|
||||
|
||||
const mergedInputs = overrides.inputs
|
||||
const mergedInputs = overrides.inputs
|
||||
? { ...defaultInputs, ...overrides.inputs }
|
||||
: defaultInputs;
|
||||
|
||||
return { ...baseContext, ...overrides, inputs: mergedInputs };
|
||||
};
|
||||
|
||||
type MockAutomationOverrides = Omit<Partial<AutomationContext>, 'inputs'> & {
|
||||
inputs?: Partial<AutomationContext['inputs']>;
|
||||
type MockAutomationOverrides = Omit<Partial<AutomationContext>, "inputs"> & {
|
||||
inputs?: Partial<AutomationContext["inputs"]>;
|
||||
};
|
||||
|
||||
export const createMockAutomationContext = (
|
||||
@@ -70,7 +70,7 @@ export const createMockAutomationContext = (
|
||||
inputs: defaultInputs,
|
||||
};
|
||||
|
||||
const mergedInputs = overrides.inputs
|
||||
const mergedInputs = overrides.inputs
|
||||
? { ...defaultInputs, ...overrides.inputs }
|
||||
: defaultInputs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user