Openstatus www.openstatus.dev
at main 67 lines 2.7 kB view raw
1name: Claude Code 2 3on: 4 issue_comment: 5 types: [created] 6 pull_request_review_comment: 7 types: [created] 8 issues: 9 types: [opened, assigned] 10 pull_request_review: 11 types: [submitted] 12 13jobs: 14 claude: 15 if: | 16 ( 17 github.event_name == 'issue_comment' && 18 contains(github.event.comment.body, '@claude') && 19 (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR') 20 ) || 21 ( 22 github.event_name == 'pull_request_review_comment' && 23 contains(github.event.comment.body, '@claude') && 24 (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR') 25 ) || 26 ( 27 github.event_name == 'pull_request_review' && 28 contains(github.event.review.body, '@claude') && 29 (github.event.review.author_association == 'OWNER' || github.event.review.author_association == 'MEMBER' || github.event.review.author_association == 'COLLABORATOR') 30 ) || 31 ( 32 github.event_name == 'issues' && 33 (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) && 34 (github.event.issue.author_association == 'OWNER' || github.event.issue.author_association == 'MEMBER' || github.event.issue.author_association == 'COLLABORATOR') 35 ) 36 runs-on: ubuntu-latest 37 timeout-minutes: 30 38 permissions: 39 contents: write 40 pull-requests: write 41 issues: write 42 id-token: write 43 actions: read # Required for Claude to read CI results on PRs 44 steps: 45 - name: Checkout repository 46 uses: actions/checkout@v4 47 with: 48 fetch-depth: 0 49 50 - name: Run Claude Code 51 id: claude 52 uses: anthropics/claude-code-action@v1 53 with: 54 claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} 55 56 # This is an optional setting that allows Claude to read CI results on PRs 57 additional_permissions: | 58 actions: read 59 60 # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. 61 # prompt: 'Update the pull request description to include a summary of changes.' 62 63 # Optional: Add claude_args to customize behavior and configuration 64 # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md 65 # or https://code.claude.com/docs/en/cli-reference for available options 66 # claude_args: '--allowed-tools Bash(gh pr:*)' 67