Fix flaky inline rename test #307
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Claude Code Review | |
| on: | |
| issue_comment: | |
| types: [ created ] | |
| jobs: | |
| claude-review: | |
| # Run only when: | |
| # 1. Comment is on a PR (not an issue) | |
| # 2. Comment contains the trigger phrase | |
| # Note: Only users with write access can trigger workflows via comments, which prevents fork abuse | |
| if: | | |
| github.event.issue.pull_request && | |
| contains(github.event.comment.body, '/claude-review') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: refs/pull/${{ github.event.issue.number }}/head | |
| fetch-depth: 1 | |
| - name: Run Claude Code Review | |
| id: claude-review | |
| uses: anthropics/claude-code-action@v1 | |
| with: | |
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | |
| prompt: | | |
| REPO: ${{ github.repository }} | |
| PR NUMBER: ${{ github.event.issue.number }} | |
| CONTRIBUTOR: ${{ github.event.issue.user.login }} | |
| REQUESTED BY: ${{ github.event.comment.user.login }} | |
| Review this PR for: | |
| - Bugs and issues | |
| - Code quality | |
| - Performance | |
| - Security | |
| - Test coverage | |
| IMPORTANT: Be concise and write to the point. Avoid extra explanations, filler words, or compliments. Focus on actionable feedback only. Every word should add value. | |
| NOTE: Some PRs contain only changelog updates (CHANGES.md and build.gradle.kts changeNotes). These are created automatically by the updateChangelogClaude.yml workflow. The actual implementation exists in previous commits. For such PRs, do NOT search for the implementation or report that it's missing - this is expected and correct. | |
| IMPORTANT: Before conducting your review, use `gh pr view ${{ github.event.issue.number }} --comments` to read existing PR comments and feedback. Consider this context in your review - avoid repeating points already raised, and address any specific concerns mentioned by reviewers or the contributor. | |
| Use inline comments for specific issues. Use the repository's CLAUDE.md for style guidance. | |
| Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. | |
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | |
| # or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options | |
| claude_args: '--allowed-tools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"' | |