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
blockingerror

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

scopechanged

On pull requests, changed (only changed files, baseline) or full (the whole project). Other events always scan everything

commenttrueCreate or update a sticky PR summary comment
review-commentstruePost inline review comments on changed lines (pull requests only)
commit-statustrue

Show the score and error/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

Read the changed-file list and post inline review comments. Drop to read to keep the changed-files scan without comments

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