Skip to content

Commit 0737dc0

Browse files
authored
Merge pull request #949 from synonymdev/ovi/disable-claude-auto-reviews
chore: disable claude auto reviews
2 parents 08e7f90 + dc006da commit 0737dc0

2 files changed

Lines changed: 16 additions & 30 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
name: Claude Code Review
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, ready_for_review, reopened]
6-
# Optional: Only run on specific file changes
7-
# paths:
8-
# - "src/**/*.ts"
9-
# - "src/**/*.tsx"
10-
# - "src/**/*.js"
11-
# - "src/**/*.jsx"
4+
workflow_dispatch:
5+
inputs:
6+
pr_number:
7+
description: "Pull request number to review"
8+
required: true
9+
type: number
1210

1311
concurrency:
14-
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
12+
group: ${{ github.workflow }}-${{ inputs.pr_number }}
1513
cancel-in-progress: true
1614

1715
jobs:
@@ -40,7 +38,7 @@ jobs:
4038
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4139
run: |
4240
REPO="${{ github.repository }}"
43-
PR_NUMBER="${{ github.event.pull_request.number }}"
41+
PR_NUMBER="${{ inputs.pr_number }}"
4442
4543
# Minimize issue comments from claude[bot]
4644
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:
6260
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
6361
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
6462
plugins: 'code-review@claude-code-plugins'
65-
prompt: '/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
63+
prompt: '/code-review:code-review --comment ${{ github.repository }}/pull/${{ inputs.pr_number }}'
6664
claude_args: |
6765
--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"

.github/workflows/claude.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
11
name: Claude Code
22

33
on:
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]
4+
workflow_dispatch:
5+
inputs:
6+
prompt:
7+
description: "Prompt for Claude Code"
8+
required: true
9+
type: string
1210

1311
jobs:
1412
claude:
15-
if: |
16-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') &&
17-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
18-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') &&
19-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
20-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') &&
21-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association)) ||
22-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) &&
23-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association))
2413
runs-on: ubuntu-latest
2514
permissions:
2615
contents: write # Allow creating branches/commits
@@ -44,8 +33,7 @@ jobs:
4433
additional_permissions: |
4534
actions: read
4635
47-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
48-
# prompt: 'Update the pull request description to include a summary of changes.'
36+
prompt: ${{ inputs.prompt }}
4937

5038
# Optional: Add claude_args to customize behavior and configuration
5139
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md

0 commit comments

Comments
 (0)