Skip to content

feat(action): add comment-on-clean input to suppress success comments - #1386

Open
skoshx wants to merge 3 commits into
mainfrom
cursor/triage-1385-0141
Open

feat(action): add comment-on-clean input to suppress success comments#1386
skoshx wants to merge 3 commits into
mainfrom
cursor/triage-1385-0141

Conversation

@skoshx

@skoshx skoshx commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new comment-on-clean input to the GitHub Action that allows users to suppress "no issues found" PR comments while still receiving comments when issues are detected.

Root Cause

The GitHub Action unconditionally posts a "React Doctor found no new issues. 🎉" comment on clean scans. Users who run the action frequently on repositories with good coverage find these success comments noisy.

Implementation

  • Added comment-on-clean input (default: true for backward compatibility)
  • Updated render script to detect and output a clean flag
  • Modified comment-posting step to skip creating new comments when:
    • Scan is clean (no issues found)
    • comment-on-clean is set to false
    • No existing comment exists
  • Existing comments are still updated to show the latest scan results

Scope Decision

This change only affects the comment posting behavior - it does not modify:

  • Diagnostic detection or reporting
  • The commit status
  • The job summary
  • Review comments

Skipped scans (no React files changed) continue to use their existing logic.

Testing

  • Added tests to verify clean output is set correctly
  • All existing tests pass
  • Lint and typecheck pass

Backward Compatibility

The new input defaults to true, maintaining the existing behavior. Users must explicitly set comment-on-clean: false to opt into the quieter mode.

Closes #1385

Open in Web Open in Cursor 

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

📦 GitHub Action release recommended

This PR changes the React Doctor GitHub Action's release surface:

  • action.yml
  • scripts/render-github-action-comment.mjs

The composite action is versioned independently from the npm packages, so it
needs its own git tag once this merges. Based on the PR title, this looks like
a minor bump (feat — a new action capability): v2.2.8v2.3.0.

After merging, cut the tag from the merge commit on main (tags are GPG-signed
annotated tags, so run this locally where your signing key is configured):

git checkout main && git pull --ff-only
merge_commit=$(git rev-parse HEAD)
git tag -a v2.3.0 "$merge_commit" -m "react-doctor action v2.3.0"
git tag -fa v2 "$merge_commit" -m "react-doctor action v2 (floating major -> v2.3.0)"
git push origin v2.3.0
git push --force origin v2   # moves only the floating major pointer

This bump can also be performed automatically on merge — set the repo
variable AUTO_BUMP_ACTION_TAG=true. Recommendation by the Action Version Bump workflow.

@pkg-pr-new

pkg-pr-new Bot commented Jul 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@1386
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@1386
npm i https://pkg.pr.new/react-doctor@1386

commit: a422dbc

@cursor

cursor Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

GitHub Action Versioning Note

⚠️ This PR modifies action.yml, which means a new GitHub Action version tag will be needed after merge.

Per the project's GitHub Action versioning policy:

  • This is a feature addition (feat) → minor version bump
  • After merge, the maintainer should create a new tag (e.g., v2.3.0) and move the floating v2 tag

RDE Parity Note

❌ RDE parity is not applicable for this change. This PR only modifies the GitHub Action's comment posting behavior and does not affect:

  • Linting rules
  • Diagnostic detection
  • Scoring
  • Any code analysis logic

The diagnostics produced by React Doctor remain completely unchanged.

@cursor
cursor Bot marked this pull request as ready for review July 18, 2026 11:08
@aidenybai
aidenybai force-pushed the cursor/triage-1385-0141 branch from bb9b261 to e6c5a53 Compare July 20, 2026 16:21
cursoragent and others added 2 commits July 20, 2026 09:26
- Add new input 'comment-on-clean' (default true) to control whether PR comments are posted on clean scans
- Update render script to detect and output 'clean' flag
- Modify comment-posting step to skip creating new comments when clean and flag is false (but still update existing ones)
- Add tests for clean scan detection

Closes #1385

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
@aidenybai
aidenybai force-pushed the cursor/triage-1385-0141 branch from e6c5a53 to e41634b Compare July 20, 2026 16:26
@github-actions

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit a422dbc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Action: Be less noisy on success

3 participants