From aafc4ed8e215d1875f33c3bca42e4edc58d67868 Mon Sep 17 00:00:00 2001 From: Cesar de la Vega <664544+vegaro@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:39:00 +0100 Subject: [PATCH 1/4] feat: Add Claude GitHub Actions workflows - claude-code-review.yml: Automatic PR code review for org members - claude.yml: Responds to @claude mentions in issues and PR comments Co-Authored-By: Claude Opus 4.5 --- .github/workflows/claude-code-review.yml | 42 +++++++++++++++++ .github/workflows/claude.yml | 58 ++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 .github/workflows/claude-code-review.yml create mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml new file mode 100644 index 0000000..41bbdac --- /dev/null +++ b/.github/workflows/claude-code-review.yml @@ -0,0 +1,42 @@ +name: Claude Code Review + +on: + pull_request: + types: [opened, synchronize, ready_for_review, reopened] + # Optional: Only run on specific file changes + # paths: + # - "src/**/*.ts" + # - "src/**/*.tsx" + # - "src/**/*.js" + # - "src/**/*.jsx" + +jobs: + claude-review: + # Only allow org members and owners to trigger Claude reviews + if: | + github.event.pull_request.author_association == 'MEMBER' || + github.event.pull_request.author_association == 'OWNER' + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code Review + id: claude-review + uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' + plugins: 'code-review@claude-code-plugins' + prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md + # or https://code.claude.com/docs/en/cli-reference for available options diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000..94a5126 --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,58 @@ +name: Claude Code + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +jobs: + claude: + if: | + ( + github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'OWNER' || + github.event.issue.author_association == 'MEMBER' || + github.event.issue.author_association == 'OWNER' || + github.event.review.author_association == 'MEMBER' || + github.event.review.author_association == 'OWNER' + ) && ( + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) + ) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + actions: read # Required for Claude to read CI results on PRs + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + + # This is an optional setting that allows Claude to read CI results on PRs + additional_permissions: | + actions: read + + # 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://code.claude.com/docs/en/cli-reference for available options + # claude_args: '--allowed-tools Bash(gh pr:*)' From cfeda7f2238afe34766708d3065877940c069700 Mon Sep 17 00:00:00 2001 From: Cesar de la Vega <664544+vegaro@users.noreply.github.com> Date: Fri, 16 Jan 2026 18:05:22 +0100 Subject: [PATCH 2/4] only member --- .github/workflows/claude-code-review.yml | 3 +-- .github/workflows/claude.yml | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 41bbdac..81586ee 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -14,8 +14,7 @@ jobs: claude-review: # Only allow org members and owners to trigger Claude reviews if: | - github.event.pull_request.author_association == 'MEMBER' || - github.event.pull_request.author_association == 'OWNER' + github.event.pull_request.author_association == 'MEMBER' runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 94a5126..3ba48f2 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -15,11 +15,8 @@ jobs: if: | ( github.event.comment.author_association == 'MEMBER' || - github.event.comment.author_association == 'OWNER' || github.event.issue.author_association == 'MEMBER' || - github.event.issue.author_association == 'OWNER' || - github.event.review.author_association == 'MEMBER' || - github.event.review.author_association == 'OWNER' + github.event.review.author_association == 'MEMBER' ) && ( (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || From 43cb87d4caefbb1d551ac13695ddcdc6577c00d1 Mon Sep 17 00:00:00 2001 From: Cesar de la Vega <664544+vegaro@users.noreply.github.com> Date: Mon, 19 Jan 2026 11:54:13 +0100 Subject: [PATCH 3/4] make sure only isseus from members --- .github/workflows/claude.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 3ba48f2..7b89cf7 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -15,8 +15,8 @@ jobs: if: | ( github.event.comment.author_association == 'MEMBER' || - github.event.issue.author_association == 'MEMBER' || - github.event.review.author_association == 'MEMBER' + github.event.review.author_association == 'MEMBER' || + (github.event_name == 'issues' && github.event.issue.author_association == 'MEMBER') ) && ( (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || From ce5f1774a8f1f6fe78060ce379b83c5c9680f734 Mon Sep 17 00:00:00 2001 From: Cesar de la Vega <664544+vegaro@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:29:05 +0100 Subject: [PATCH 4/4] remove from draft PRs --- .github/workflows/claude-code-review.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 81586ee..1ee432e 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -14,7 +14,8 @@ jobs: claude-review: # Only allow org members and owners to trigger Claude reviews if: | - github.event.pull_request.author_association == 'MEMBER' + github.event.pull_request.author_association == 'MEMBER' && + !github.event.pull_request.draft runs-on: ubuntu-latest permissions: