New
Introducing React Bench, see how different models perform on React code

GitHub Action reference

Every input, output, and permission for the millionco/react-doctor Action. For setup and the full workflow file, see GitHub Actions setup.

Inputs

Set inputs with a with: block under the step. Every input is optional.

- uses: millionco/react-doctor@v2
  with:
    blocking: warning
    scope: full
InputDefaultDescription
blockingnone

Severity that fails the workflow: error, warning, or none (advisory)

scopechanged

On pull requests, report introduced issues with changed, all issues in changed files with files, issues on changed lines with lines, or every issue with full. Other events always scan the full project

commenttrue

Create or update a sticky PR summary comment. Skipped when the pull request changes no React files

review-commentstruePost inline review comments on changed lines (pull requests only)
commit-statustrue

Show the score and error and warning counts next to the commit (needs statuses: write)

project*

Workspace project(s) to scan, comma-separated. * scans every discovered project

directory.Project directory to scan
node-version24Node.js version to use
versionlatest

react-doctor npm version or package spec to run

Outputs

Read outputs in later steps with ${{ steps.<step-id>.outputs.<name> }}.

OutputDescription
scoreHealth score (0 to 100). Empty when scoring was unavailable
total-issues

Total diagnostics; on pull requests, the number your change introduced

fixed-issues

On pull requests, the number of issues your change resolved (otherwise 0)

error-countError diagnostic count
warning-countWarning diagnostic count
affected-filesNumber of files with diagnostics

The score output is empty in offline mode, or when the score API is unreachable, so handle that case if you read it in a later step.

Permissions

A workflow can only read your code by default. The Action needs these added under permissions:.

PermissionWhy it is needed
contents: readCheck out and read your code. Required
pull-requests: write

Post inline review comments. read also lets the Action use the GitHub API when it cannot derive changed files from git

issues: write

Post the sticky summary comment (a PR comment uses the issues API)

statuses: write

Show the score and counts next to the commit. Omit if you set commit-status: false