mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
Fix: Pass GitHub token to MCP servers in agent mode
The token was being obtained successfully but not outputted from the prepare step for use in later steps. Added explicit output of the GitHub token and debug logging.
This commit is contained in:
@@ -56,6 +56,7 @@ async function run() {
|
|||||||
mode,
|
mode,
|
||||||
githubToken,
|
githubToken,
|
||||||
});
|
});
|
||||||
|
core.setOutput("GITHUB_TOKEN", githubToken);
|
||||||
|
|
||||||
// MCP config is handled by individual modes (tag/agent) and included in their claude_args output
|
// MCP config is handled by individual modes (tag/agent) and included in their claude_args output
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ export const agentMode: Mode = {
|
|||||||
|
|
||||||
async prepare({ context, githubToken }: ModeOptions): Promise<ModeResult> {
|
async prepare({ context, githubToken }: ModeOptions): Promise<ModeResult> {
|
||||||
// Agent mode handles automation events and any event with explicit prompts
|
// Agent mode handles automation events and any event with explicit prompts
|
||||||
|
|
||||||
|
console.log(`Agent mode: githubToken provided: ${!!githubToken}, length: ${githubToken?.length || 0}`);
|
||||||
|
|
||||||
// TODO: handle by createPrompt (similar to tag and review modes)
|
// TODO: handle by createPrompt (similar to tag and review modes)
|
||||||
// Create prompt directory
|
// Create prompt directory
|
||||||
|
|||||||
Reference in New Issue
Block a user