Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit af3674b

Browse files
paul-fractureclaude
andcommitted
Simplify workflow token usage and fix version to 0.5.4
- Remove custom token passing in reusable workflows - Use built-in github.token instead of passing token as a secret - Fix workflow validation errors by removing reserved GITHUB_TOKEN name - Update README and examples to match the simplified approach - Bump version to 0.5.4 This is a much cleaner approach that uses GitHub's built-in token mechanism rather than requiring users to pass the token explicitly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f5c7db5 commit af3674b

5 files changed

Lines changed: 16 additions & 27 deletions

File tree

.github/workflows/claude-full.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ on:
2626
secrets:
2727
ANTHROPIC_API_KEY:
2828
required: true
29-
GH_TOKEN:
30-
required: true
31-
description: 'GitHub token for repository access'
3229

3330
jobs:
3431
# Handle issue analysis comments
@@ -71,7 +68,7 @@ jobs:
7168
feedback: ${{ steps.issue.outputs.feedback }}
7269
debug-mode: ${{ inputs.debug-mode || 'false' }}
7370
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
74-
github-token: ${{ secrets.GH_TOKEN }}
71+
github-token: ${{ github.token }}
7572

7673
- name: Upload claude output artifacts
7774
if: always()
@@ -97,7 +94,7 @@ jobs:
9794

9895
- name: Setup GitHub CLI
9996
run: |
100-
gh auth login --with-token <<< "${{ secrets.GH_TOKEN }}"
97+
gh auth login --with-token <<< "${{ github.token }}"
10198
10299
- name: Setup git user
103100
run: |
@@ -132,7 +129,7 @@ jobs:
132129
debug-mode: ${{ inputs.debug-mode || 'false' }}
133130
feedback: ${{ steps.issue.outputs.feedback }}
134131
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
135-
github-token: ${{ secrets.GH_TOKEN }}
132+
github-token: ${{ github.token }}
136133

137134
- name: Upload claude output artifacts
138135
if: always()
@@ -179,7 +176,7 @@ jobs:
179176
feedback: ${{ steps.pr.outputs.feedback }}
180177
debug-mode: ${{ inputs.debug-mode || 'false' }}
181178
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
182-
github-token: ${{ secrets.GH_TOKEN }}
179+
github-token: ${{ github.token }}
183180

184181
process-pr-suggestions:
185182
runs-on: ubuntu-latest
@@ -219,7 +216,7 @@ jobs:
219216
strict-mode: ${{ inputs.strict-mode || 'true' }}
220217
debug-mode: ${{ inputs.debug-mode || 'false' }}
221218
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
222-
github-token: ${{ secrets.GH_TOKEN }}
219+
github-token: ${{ github.token }}
223220

224221
# Handle code review comments
225222
process-review-comment:
@@ -275,7 +272,7 @@ jobs:
275272
feedback: ${{ steps.details.outputs.feedback }}
276273
debug-mode: ${{ inputs.debug-mode || 'false' }}
277274
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
278-
github-token: ${{ secrets.GH_TOKEN }}
275+
github-token: ${{ github.token }}
279276

280277
process-suggest-review-comment:
281278
runs-on: ubuntu-latest
@@ -334,4 +331,4 @@ jobs:
334331
strict-mode: ${{ inputs.strict-mode || 'true' }}
335332
debug-mode: ${{ inputs.debug-mode || 'false' }}
336333
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
337-
github-token: ${{ secrets.GH_TOKEN }}
334+
github-token: ${{ github.token }}

.github/workflows/claude-label-fix.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ on:
2121
secrets:
2222
ANTHROPIC_API_KEY:
2323
required: true
24-
GH_TOKEN:
25-
required: true
26-
description: 'GitHub token for repository access'
2724

2825
jobs:
2926
process-issue-fix:
@@ -42,7 +39,7 @@ jobs:
4239

4340
- name: Setup GitHub CLI
4441
run: |
45-
gh auth login --with-token <<< "${{ secrets.GH_TOKEN }}"
42+
gh auth login --with-token <<< "${{ github.token }}"
4643
4744
- name: Setup git user
4845
run: |
@@ -60,7 +57,7 @@ jobs:
6057
issue-label: ${{ inputs.issue-label || 'claude-fix' }}
6158
debug-mode: ${{ inputs.debug-mode || 'false' }}
6259
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
63-
github-token: ${{ secrets.GH_TOKEN }}
60+
github-token: ${{ github.token }}
6461

6562
- name: Upload claude output artifacts
6663
if: always()

.github/workflows/example-minimal.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ jobs:
1717
debug-mode: false # Set to true for verbose logging
1818
strict-mode: true # Set to false to allow Claude to make additional improvements
1919
secrets:
20-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
21-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ on:
3030

3131
jobs:
3232
claude-integration:
33-
uses: fractureinc/claude-code-github-action/.github/workflows/claude-full.yml@v0.5.3
33+
uses: fractureinc/claude-code-github-action/.github/workflows/claude-full.yml@v0.5.4
3434
with:
3535
issue-label: 'claude-fix' # Optional: customize the trigger label
3636
secrets:
3737
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
38-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3938
```
4039
4140
**File: `.github/workflows/claude-issue-fix.yml`**
@@ -48,12 +47,11 @@ on:
4847
4948
jobs:
5049
claude-label-fix:
51-
uses: fractureinc/claude-code-github-action/.github/workflows/claude-label-fix.yml@v0.5.3
50+
uses: fractureinc/claude-code-github-action/.github/workflows/claude-label-fix.yml@v0.5.4
5251
with:
5352
issue-label: 'claude-fix' # Must match your chosen label
5453
secrets:
5554
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
56-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5755
```
5856

5957
### 2. Use Claude in PRs and Issues
@@ -99,7 +97,7 @@ The reusable workflows support several configuration options:
9997
```yaml
10098
jobs:
10199
claude-integration:
102-
uses: fractureinc/claude-code-github-action/.github/workflows/claude-full.yml@v0.5.3
100+
uses: fractureinc/claude-code-github-action/.github/workflows/claude-full.yml@v0.5.4
103101
with:
104102
# All parameters are optional with sensible defaults
105103
issue-label: 'claude-fix' # Label that triggers issue fixes
@@ -108,23 +106,21 @@ jobs:
108106
strict-mode: true # When false, allows Claude to add improvements
109107
secrets:
110108
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
111-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112109
```
113110

114111
### Label-Based Integration (`claude-label-fix.yml`)
115112

116113
```yaml
117114
jobs:
118115
claude-label-fix:
119-
uses: fractureinc/claude-code-github-action/.github/workflows/claude-label-fix.yml@v0.5.3
116+
uses: fractureinc/claude-code-github-action/.github/workflows/claude-label-fix.yml@v0.5.4
120117
with:
121118
# All parameters are optional with sensible defaults
122119
issue-label: 'claude-fix' # Must match the label you're using
123120
branch-prefix: 'fix' # Prefix for branches created by fixes
124121
debug-mode: false # Enable verbose logging
125122
secrets:
126123
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
127-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128124
```
129125

130126
Only repo maintainers with write access can add labels, providing security control over which issues Claude will fix.
@@ -156,7 +152,7 @@ All parameters are optional and have sensible defaults.
156152

157153
## Enhanced Context for Claude
158154

159-
With version 0.5.3, Claude now receives complete context for your PRs and issues, including:
155+
With version 0.5.4, Claude now receives complete context for your PRs and issues, including:
160156

161157
- PR metadata (title, description, branch info)
162158
- Issue details (title, description, labels)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-code-github-action",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"description": "GitHub action for Claude Code Integration in PR comments, reviews, inline code suggestions, and issue-based fixes",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)