Thinky Face

Thinky Face is your prompt library, finally organized. Unlimited prompt storage, full version control, fork other users' prompts, public & private sharing, MCP server, teams, and much more. Learn more.

Create Free Account

No credit card required

Claude Code Review GitHub Action

Donn Felker @donnfelker Updated 9 months ago Public

Description

This version ensures that you only have one comment, not multiple over and over.

Save this here: .github/workflows/claude-code-review.yml

Prompt Files

claude-code-review.yml

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"

jobs:
  claude-review:
    # Skip automatic reviews for draft PRs (manual @claude mentions still work via claude.yml)
    if: github.event.pull_request.draft == false
    # Optional: Filter by PR author
    # if: |
    #   github.event.pull_request.draft == false &&
    #   (github.event.pull_request.user.login == 'external-contributor' ||
    #   github.event.pull_request.user.login == 'new-developer' ||
    #   github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR')

    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
      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@beta
        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

          # Direct prompt for automated review (no @claude mention needed)
          direct_prompt: |
            Please review this pull request and provide feedback on:
            - Code quality and best practices
            - Potential bugs or issues
            - Performance considerations
            - Security concerns
            - Test coverage

            Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.

          # Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
          use_sticky_comment: true

Comments

Write a comment...

Press Enter to post

No comments yet. Be the first to comment.