GitHub Actions setup

Add a workflow to scan every pull request and leave findings where reviewers already look:

name: React Doctor

on:
  pull_request:

permissions:
  contents: read
  pull-requests: write

jobs:
  react-doctor:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: millionco/react-doctor@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          diff: ${{ github.base_ref }}
          fail-on: error
          annotations: true

diff keeps CI focused on files changed in the PR. annotations shows findings inline in GitHub's Files changed view. github-token enables a sticky React Doctor PR comment with the score and scan output.

Use fail-on: warning for a stricter gate, or fail-on: none while introducing React Doctor to an existing codebase.