mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
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
This commit is contained in:
@@ -93,6 +93,9 @@ outputs:
|
|||||||
branch_name:
|
branch_name:
|
||||||
description: "The branch created by Claude Code for this execution"
|
description: "The branch created by Claude Code for this execution"
|
||||||
value: ${{ steps.prepare.outputs.CLAUDE_BRANCH }}
|
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:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ async function run() {
|
|||||||
|
|
||||||
// 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
|
||||||
|
|
||||||
|
// Expose the GitHub token (Claude App token) as an output
|
||||||
|
core.setOutput("github_token", githubToken);
|
||||||
|
|
||||||
// Step 6: Get system prompt from mode if available
|
// Step 6: Get system prompt from mode if available
|
||||||
if (mode.getSystemPrompt) {
|
if (mode.getSystemPrompt) {
|
||||||
const modeContext = mode.prepareContext(context, {
|
const modeContext = mode.prepareContext(context, {
|
||||||
|
|||||||
Reference in New Issue
Block a user