Configuration
React Doctor starts in advisory mode and reports only issues introduced by the pull request. To map the entire project before you enforce a gate, run a full scan:
- uses: millionco/react-doctor@v2
with:
blocking: none
scope: fullblocking: none reports issues without failing the check. scope: full scans the whole project. The other scopes are changed, files, and lines.
React Doctor starts in advisory mode. When the team trusts the signal, set blocking: error to fail on new errors or blocking: warning to fail on any new finding.
For more configuration options, see the Action reference.
Monorepos and subdirectories
Point the Action at an app in a subfolder with directory:
- uses: millionco/react-doctor@v2
with:
directory: apps/webBy default, project: "*" finds and scans every React project. To scan only some projects, list them:
- uses: millionco/react-doctor@v2
with:
project: "web,admin"What happens on a pull request
On a pull request, React Doctor reports findings in three places: the PR conversation, inline review comments, and the CI logs.
When it finds a new issue on a changed line, it leaves an inline review comment and updates the same summary comment. If the configured blocking level includes that issue, the check fails for branch protection.
Pushes to main only record the score, with no comment and no failure, so main never goes red over old issues.
Pull request feedback
The Action creates or updates one sticky summary comment instead of stacking new ones. It shows issue counts, the score, links each error to its file:line, groups warnings by file, and notes what your change added or fixed.
Inline review comments appear on the changed lines that triggered a diagnostic. Each includes a suggested fix and a link to the relevant docs, and React Doctor caps them so the summary stays the complete record.
Every run also includes the full terminal output in the CI logs, so reviewers can fall back to them when PR comments are disabled or unavailable.
Feedback controls
Use Action inputs to control where feedback appears:
- uses: millionco/react-doctor@v2
with:
comment: false
review-comments: false
commit-status: falsecomment needs issues: write, review-comments needs pull-requests: write, and commit-status needs statuses: write. To control what reaches the pull request comment, use surfaces.prComment in your React Doctor config.
Use another CI provider
The scanner is a plain CLI, so it also runs on GitLab CI, CircleCI, Jenkins, and Buildkite. See Other CI providers.
Troubleshooting
It reported existing issues on a pull request. The checkout couldn't find where your pull request started. Add fetch-depth: 0 to the actions/checkout step.
No comment showed up. Check the workflow has pull-requests: write and issues: write, and that comment isn't false. Comments never appear on push runs, only pull requests.
The status or score isn't showing. That needs statuses: write (unless you set commit-status: false). The Action warns in the run log when the permission is missing.
It's failing PRs before the team is ready. Set blocking: none to report findings without failing the workflow, then tighten later.
A failing check doesn't block the merge. Add the React Doctor check as required under Settings → Branches → Branch protection rules. Without that, a red check shows but the merge button still works.
PRs from forks don't get comments. GitHub blocks write access on fork pull requests for security. The scan still runs and still passes or fails, but it can't post a comment.