|
1 | | -name: Claude PR Assistant |
| 1 | +name: Claude Code |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | issue_comment: |
|
11 | 11 | types: [submitted] |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - claude-code-action: |
| 14 | + claude: |
15 | 15 | if: | |
16 | 16 | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || |
17 | 17 | (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || |
18 | 18 | (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || |
19 | | - (github.event_name == 'issues' && contains(github.event.issue.body, '@claude')) |
| 19 | + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) |
20 | 20 | runs-on: ubuntu-latest |
21 | 21 | permissions: |
22 | 22 | contents: read |
23 | 23 | pull-requests: read |
24 | 24 | issues: read |
25 | 25 | id-token: write |
| 26 | + actions: read # Required for Claude to read CI results on PRs |
26 | 27 | steps: |
27 | 28 | - name: Checkout repository |
28 | 29 | uses: actions/checkout@v4 |
29 | 30 | with: |
30 | 31 | fetch-depth: 1 |
31 | 32 |
|
32 | | - - name: Install pnpm |
33 | | - uses: pnpm/action-setup@v4 |
34 | | - |
35 | | - - name: Setup Node.js |
36 | | - uses: actions/setup-node@v4 |
| 33 | + - name: Run Claude Code |
| 34 | + id: claude |
| 35 | + uses: anthropics/claude-code-action@v1 |
37 | 36 | with: |
38 | | - node-version: "lts/*" |
39 | | - cache: "pnpm" |
| 37 | + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
40 | 38 |
|
41 | | - - name: Install dependencies |
42 | | - run: pnpm install |
| 39 | + # This is an optional setting that allows Claude to read CI results on PRs |
| 40 | + additional_permissions: | |
| 41 | + actions: read |
| 42 | +
|
| 43 | + # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. |
| 44 | + # prompt: 'Update the pull request description to include a summary of changes.' |
| 45 | + |
| 46 | + # Optional: Add claude_args to customize behavior and configuration |
| 47 | + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md |
| 48 | + # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options |
| 49 | + # claude_args: '--allowed-tools Bash(gh pr:*)' |
43 | 50 |
|
44 | | - - name: Run Claude PR Action |
45 | | - uses: anthropics/claude-code-action@beta |
46 | | - with: |
47 | | - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
48 | | - timeout_minutes: "5" |
49 | | - # mcp_config: | |
50 | | - # { |
51 | | - # "mcpServers": { |
52 | | - # "astro-docs": { |
53 | | - # "type": "http", |
54 | | - # "url": "https://mcp.docs.astro.build/mcp" |
55 | | - # } |
56 | | - # } |
57 | | - # } |
58 | | - allowed_tools: | |
59 | | - Bash(pnpm install) |
60 | | - Bash(pnpm run:*) |
61 | | - Bash(npm run:*) |
62 | | - Bash(npx packages/am-i-vibing) |
63 | | - # mcp__astro-docs__search_astro_docs |
64 | | - # Optional: Restrict network access to specific domains only |
65 | | - # experimental_allowed_domains: | |
66 | | - # .anthropic.com |
67 | | - # .github.com |
68 | | - # api.github.com |
69 | | - # .githubusercontent.com |
70 | | - # bun.sh |
71 | | - # registry.npmjs.org |
72 | | - # .blob.core.windows.net |
0 commit comments