File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,20 @@ jobs:
1212 pull-requests : write
1313 issues : write
1414 id-token : write
15+ env :
16+ OVERRIDE_GITHUB_TOKEN : ${{ secrets.CLAUDE_PAT_TOKEN }}
1517 steps :
1618 # Simply checking out the repository is sufficient - the action handles the PR code
1719 - name : Checkout code
1820 uses : actions/checkout@v4
1921 with :
2022 fetch-depth : 0 # Get full history for accurate diffs
2123
24+
2225 - name : Run Code Review with Claude
2326 uses : anthropics/claude-code-action@beta
27+ env :
28+ OVERRIDE_GITHUB_TOKEN : ${{ secrets.CLAUDE_PAT_TOKEN }}
2429 with :
2530 # Your Anthropic API key
2631 anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
Original file line number Diff line number Diff line change 1414 issues : write
1515 id-token : write
1616 steps :
17+ # Set environment variables for Claude Code Action
18+ - name : Set up environment
19+ run : |
20+ echo "OVERRIDE_GITHUB_TOKEN=${{ secrets.CLAUDE_PAT_TOKEN }}" >> $GITHUB_ENV
21+ echo "Setting up PAT token for Claude Code Action"
22+
1723 # Simply checking out the repository is sufficient
1824 - name : Checkout code
1925 uses : actions/checkout@v4
2632 # Your Anthropic API key
2733 anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
2834
29- # Explicitly set the trigger phrase and provide github token
35+ # Explicitly set the trigger phrase
3036 trigger_phrase : " @claude"
31- github_token : ${{ secrets.GITHUB_TOKEN }}
37+ # Note: Token is provided via OVERRIDE_GITHUB_TOKEN environment variable
3238
3339 # Timeout for execution
3440 timeout_minutes : 20
Original file line number Diff line number Diff line change 1919 issues : write
2020 id-token : write
2121 steps :
22+ # Set environment variables for Claude Code Action
23+ - name : Set up environment
24+ run : |
25+ echo "OVERRIDE_GITHUB_TOKEN=${{ secrets.CLAUDE_PAT_TOKEN }}" >> $GITHUB_ENV
26+ echo "Setting up PAT token for Claude Code Action"
27+
2228 # Simply checking out the repository is sufficient
2329 - name : Checkout code
2430 uses : actions/checkout@v4
@@ -44,17 +50,17 @@ jobs:
4450 git status
4551 git branch
4652 env :
47- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ GITHUB_TOKEN : ${{ secrets.CLAUDE_PAT_TOKEN }}
4854
4955 - name : Claude PR Creation
5056 uses : anthropics/claude-code-action@beta
5157 with :
5258 # Your Anthropic API key
5359 anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
5460
55- # Explicitly set the trigger phrase and provide github token
61+ # Explicitly set the trigger phrase
5662 trigger_phrase : " @claude"
57- github_token : ${{ secrets.GITHUB_TOKEN }}
63+ # Note: Token is provided via OVERRIDE_GITHUB_TOKEN environment variable
5864
5965 # Timeout for execution (longer for PR creation)
6066 timeout_minutes : 30
You can’t perform that action at this time.
0 commit comments