From 8c8d0a0f1f0f12f0fbdae8752f8c6973e7cc82dd Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Mon, 12 Jan 2026 23:20:35 +0100 Subject: [PATCH 1/2] "Update Claude PR Assistant workflow" --- .github/workflows/claude.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index f1e5ec04..d300267f 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -12,28 +12,23 @@ on: jobs: claude: - # Only allow trusted actors (OWNER, MEMBER, COLLABORATOR) to trigger Claude with write permissions if: | - (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)) + (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: write # Allow creating branches/commits - pull-requests: write # Allow pushing to PR branches - issues: write # Allow updating issue comments + contents: read + pull-requests: read + issues: read id-token: write - actions: read # Required for Claude to read CI results on PRs + actions: read # Required for Claude to read CI results on PRs steps: - name: Checkout repository uses: actions/checkout@v4 with: - fetch-depth: 0 # Full history for git operations + fetch-depth: 1 - name: Run Claude Code id: claude @@ -52,3 +47,4 @@ jobs: # 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 2ecff2fa46438e47b3b8db67bfc80f4f51825f97 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Mon, 12 Jan 2026 23:20:36 +0100 Subject: [PATCH 2/2] "Update Claude Code Review workflow" --- .github/workflows/claude-code-review.yml | 27 ++++++------------------ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 0099add4..b5e8cfd4 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -2,7 +2,7 @@ name: Claude Code Review on: pull_request: - types: [opened, synchronize] + types: [opened, synchronize, ready_for_review, reopened] # Optional: Only run on specific file changes # paths: # - "src/**/*.ts" @@ -21,8 +21,8 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - pull-requests: write - issues: write + pull-requests: read + issues: read id-token: write steps: @@ -36,22 +36,9 @@ jobs: uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - use_sticky_comment: true - additional_permissions: | - actions: read - prompt: | - REPO: ${{ github.repository }} - PR NUMBER: ${{ github.event.pull_request.number }} - - Please review this pull request and provide feedback on: - - Code quality and best practices - - Potential bugs or issues - - Performance considerations - - Security concerns - - Test coverage - - Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. - + 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 - claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' +