Skip to content

Commit 85a4694

Browse files
authored
Merge pull request #114 from AdjectiveAllison/ci_again
trying with PAT token
2 parents ea88e46 + db4a917 commit 85a4694

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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 }}

.github/workflows/claude-comment-response.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
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
@@ -26,9 +32,9 @@ jobs:
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

.github/workflows/claude-pr-creation.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
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

0 commit comments

Comments
 (0)