ci(react-doctor): add official PR-review Action, drop redundant CLI step (#1156)

Adds the official react-doctor GitHub Action (millionco/react-doctor@v1),
which posts inline review comments + a sticky summary for issues a PR
INTRODUCES (diffed against the merge-base) -- more visible than the
previous CLI '--annotations' markers.

Removes the now-redundant react-doctor steps from ci.yml (the
detect-changes/diff-annotations/skip steps and the push-time full scan)
so react-doctor runs once per PR, not twice. It reads doctor.config.jsonc,
so the React-Compiler rules we don't enforce stay suppressed.
This commit is contained in:
Tommaso Casaburi
2026-06-05 22:34:29 +07:00
committed by GitHub
parent 0493492f55
commit aa5a985201
2 changed files with 28 additions and 24 deletions
-24
View File
@@ -76,30 +76,6 @@ jobs:
- name: Verify forge config
run: node -e "import('./forge.config.js').then(c => console.log('Config loaded, makers:', c.default.makers?.length || 0)).catch(e => { console.error(e); process.exit(1); })"
- name: Detect React UI changes
id: react-ui-changes
if: github.event_name == 'pull_request'
run: |
git diff --name-only "${{ github.event.pull_request.base.sha }}" HEAD > changed-files.txt
cat changed-files.txt
if grep -Eq '^(src/(components|views|hooks|stores)/|src/app\.tsx|src/main\.tsx)' changed-files.txt; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Run React Doctor
if: github.event_name != 'pull_request'
run: yarn doctor
- name: Run React Doctor on changed React files
if: github.event_name == 'pull_request' && steps.react-ui-changes.outputs.changed == 'true'
run: yarn doctor --diff "${{ github.event.pull_request.base.sha }}" --annotations
- name: Skip React Doctor
if: github.event_name == 'pull_request' && steps.react-ui-changes.outputs.changed != 'true'
run: echo "Skipping React Doctor because this pull request did not change React UI source."
- name: Install Chromium for smoke tests
run: npx playwright install --with-deps chromium
+28
View File
@@ -0,0 +1,28 @@
# React Doctor PR review.
# Reports only issues this PR INTRODUCES (diffed against the merge-base) as inline
# review comments + a sticky summary. It reads doctor.config.jsonc, so the
# React-Compiler rules we don't enforce stay suppressed (see that file and
# docs/agent-playbooks/known-surprises.md). We do NOT chase the aggregate score.
name: React Doctor
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
pull-requests: write
issues: write
concurrency:
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
react-doctor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # so React Doctor can diff against the merge-base for new-vs-existing
- uses: millionco/react-doctor@v1