Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Claude Code Review

on:
pull_request:
types: [] # [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request_review:
types: [submitted]

jobs:
claude-review:
Expand All @@ -18,6 +16,7 @@ jobs:
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

if: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Using `if: false` is a simple and effective way to disable the job while keeping the configuration intact for future use. Note that the workflow will still trigger on the specified events but will be marked as skipped in the Actions tab.

runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -67,7 +66,7 @@ jobs:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
PR NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 This logic robustly handles different event types. Specifically, `issue_comment` on a Pull Request uses `github.event.issue.number`, while `pull_request` and `pull_request_review` events use `github.event.pull_request.number`.

Please review this pull request and provide feedback on:
- Code quality and best practices
Expand Down
Loading