fix: merge latest dev updates into main #25
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: AI Code Review | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| # Intentionally excluded: changes to the review script itself are not | |
| # self-reviewed to prevent prompt injection via modified review logic. | |
| - '.github/workflows/ai-review.yml' | |
| - 'scripts/ai-review.mjs' | |
| permissions: | |
| contents: read # needed for checkout | |
| pull-requests: write # needed to post PR comments | |
| jobs: | |
| review: | |
| name: Claude Code Review | |
| runs-on: ubuntu-latest | |
| # Skip if the PR was opened by the bot or Dependabot | |
| if: github.actor != 'github-actions[bot]' && github.actor != 'dependabot[bot]' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| # npm ci uses the committed package-lock.json — transitive deps are fully pinned | |
| run: npm ci --ignore-scripts | |
| - name: Run AI Review | |
| env: | |
| # GITHUB_TOKEN is sufficient — permissions block above scopes it correctly. | |
| # No need for a broad PAT (AUTO_PR_TOKEN). | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: node scripts/ai-review.mjs |