Skip to content

chore(deps): bump actions/cache from 5.0.1 to 5.0.2 in the actions-minor-patch group #342

chore(deps): bump actions/cache from 5.0.1 to 5.0.2 in the actions-minor-patch group

chore(deps): bump actions/cache from 5.0.1 to 5.0.2 in the actions-minor-patch group #342

Workflow file for this run

name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened]
pull_request_review:
types: [submitted]
# Group by issue/PR number AND actor to prevent bot comments from canceling user runs
# Bot runs will be in separate groups and get skipped by job-level `if` conditions
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}-${{ github.actor }}
cancel-in-progress: true
jobs:
claude:
# Only allow repo collaborators (OWNER, MEMBER, COLLABORATOR) to trigger @claude
# Exclude bots to prevent Claude's own comments from triggering/canceling runs
if: |
github.actor != 'dependabot[bot]' &&
github.actor != 'claude[bot]' &&
(
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review_comment' &&
contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review' &&
contains(github.event.review.body, '@claude') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.review.author_association)) ||
(github.event_name == 'issues' &&
(contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.issue.author_association))
)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write # Write access for pushing branches
pull-requests: write
issues: write
id-token: write
actions: read # Required by claude-code-action to access workflow run data
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@a017b830c03e23789b11fb69ed571ea61c12e45c # v1.0.30
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
use_commit_signing: true
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'
# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
# claude_args: '--allowedTools "Bash(gh pr:*)"'