Skip to content

Test Claude Code GitHub Action #5

Test Claude Code GitHub Action

Test Claude Code GitHub Action #5

Workflow file for this run

name: Test Claude Code Action
on:
issue_comment:
types: [created]
jobs:
process-pr-comment:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, 'claude:') }}
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get PR details
id: pr
run: |
PR_NUMBER="${{ github.event.issue.number }}"
FEEDBACK="${{ github.event.comment.body }}"
# Remove the "claude:" prefix
FEEDBACK="${FEEDBACK#claude:}"
echo "number=$PR_NUMBER" >> $GITHUB_OUTPUT
echo "feedback=$FEEDBACK" >> $GITHUB_OUTPUT
- name: Process with Claude Code
uses: fractureinc/claude-code-github-action@v0.1.5
with:
mode: 'review'
pr-number: ${{ steps.pr.outputs.number }}
feedback: ${{ steps.pr.outputs.feedback }}
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
model-id: 'claude-3-7-sonnet-20250219'