From c72a45a95fe960916111b36150bdcc40bcba6329 Mon Sep 17 00:00:00 2001 From: Kashyap Murali <13315300+katchu11@users.noreply.github.com> Date: Tue, 19 Aug 2025 22:53:43 -0700 Subject: [PATCH] feat: Expose GitHub token as action output for external use This allows workflows to use the Claude App token obtained by the action for posting comments as claude[bot] instead of github-actions[bot]. Changes: - Add github_token output to action.yml - Export token from prepare.ts after authentication - Allows workflows to use the same token Claude uses internally --- action.yml | 3 +++ src/entrypoints/prepare.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/action.yml b/action.yml index cbf36c9..4c9f640 100644 --- a/action.yml +++ b/action.yml @@ -93,6 +93,9 @@ outputs: branch_name: description: "The branch created by Claude Code for this execution" value: ${{ steps.prepare.outputs.CLAUDE_BRANCH }} + github_token: + description: "The GitHub token used by the action (Claude App token if available)" + value: ${{ steps.prepare.outputs.github_token }} runs: using: "composite" diff --git a/src/entrypoints/prepare.ts b/src/entrypoints/prepare.ts index a406a3b..7c3e8d5 100644 --- a/src/entrypoints/prepare.ts +++ b/src/entrypoints/prepare.ts @@ -61,6 +61,9 @@ async function run() { }); // MCP config is handled by individual modes (tag/agent) and included in their claude_args output + + // Expose the GitHub token (Claude App token) as an output + core.setOutput("github_token", githubToken); // Step 6: Get system prompt from mode if available if (mode.getSystemPrompt) {