From dc006da83d3c0de4e109df4bdc40bf3d9870e01b Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Sat, 16 May 2026 13:14:31 +0200 Subject: [PATCH] chore: disable claude auto reviews --- .github/workflows/claude-code-review.yml | 20 ++++++++---------- .github/workflows/claude.yml | 26 +++++++----------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index e7b46a904..763e7d010 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -1,17 +1,15 @@ 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" + workflow_dispatch: + inputs: + pr_number: + description: "Pull request number to review" + required: true + type: number concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-${{ inputs.pr_number }} cancel-in-progress: true jobs: @@ -40,7 +38,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | REPO="${{ github.repository }}" - PR_NUMBER="${{ github.event.pull_request.number }}" + PR_NUMBER="${{ inputs.pr_number }}" # Minimize issue comments from claude[bot] gh api "repos/$REPO/issues/$PR_NUMBER/comments" --jq '.[] | select(.user.login == "claude[bot]") | .node_id' | while read -r node_id; do @@ -62,6 +60,6 @@ jobs: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' plugins: 'code-review@claude-code-plugins' - prompt: '/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + prompt: '/code-review:code-review --comment ${{ github.repository }}/pull/${{ inputs.pr_number }}' claude_args: | --allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh api:*),Bash(git log:*),Bash(git diff:*),Bash(git blame:*),Read,Glob,Grep" diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 76cb06e68..3a95b7a7d 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -1,26 +1,15 @@ name: Claude Code on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - issues: - types: [opened, assigned] - pull_request_review: - types: [submitted] + workflow_dispatch: + inputs: + prompt: + description: "Prompt for Claude Code" + required: true + type: string jobs: claude: - 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)) runs-on: ubuntu-latest permissions: contents: write # Allow creating branches/commits @@ -44,8 +33,7 @@ jobs: 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.' + prompt: ${{ inputs.prompt }} # Optional: Add claude_args to customize behavior and configuration # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md