feat(action): add comment-on-clean input to suppress success comments - #1386
feat(action): add comment-on-clean input to suppress success comments#1386skoshx wants to merge 3 commits into
Conversation
📦 GitHub Action release recommendedThis PR changes the React Doctor GitHub Action's release surface:
The composite action is versioned independently from the npm packages, so it After merging, cut the tag from the merge commit on 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 pointerThis bump can also be performed automatically on merge — set the repo |
commit: |
GitHub Action Versioning Note
Per the project's GitHub Action versioning policy:
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:
The diagnostics produced by React Doctor remain completely unchanged. |
bb9b261 to
e6c5a53
Compare
- 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>
e6c5a53 to
e41634b
Compare
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Summary
Adds a new
comment-on-cleaninput 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
comment-on-cleaninput (default:truefor backward compatibility)cleanflagcomment-on-cleanis set tofalseScope Decision
This change only affects the comment posting behavior - it does not modify:
Skipped scans (no React files changed) continue to use their existing logic.
Testing
cleanoutput is set correctlyBackward Compatibility
The new input defaults to
true, maintaining the existing behavior. Users must explicitly setcomment-on-clean: falseto opt into the quieter mode.Closes #1385