fix(merge): linear scan for the whitespace loop-open tag — no regex c… #164
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: | |
| 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" | |
| jobs: | |
| claude-review: | |
| # Fork PRs cannot run this, and must not be blocked by it. | |
| # | |
| # GitHub withholds secrets and refuses `id-token: write` on `pull_request` | |
| # runs from a fork, whatever the workflow declares — so the action failed at | |
| # "Could not fetch an OIDC token", and the red check gated a merge it could | |
| # never pass. PR #286 sat on that. | |
| # | |
| # Skipping is the fix. The alternative that would make it run is | |
| # `pull_request_target`, which executes the contributor's code in the base | |
| # repo's context with secrets and a write token — a well-known way to hand | |
| # the repository to anyone who can open a pull request. Not worth automated | |
| # review on external contributions. | |
| # | |
| # Fork PRs get a human review instead. | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| issues: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| 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 }} | |
| 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 |