Commit 9e9539e
Only dismiss reviews posted by this action (#14)
## Summary
Fixes a bug where `dismissStaleReviews()` would dismiss ALL bot reviews,
including those from Dependabot, Renovate, or other important bot
reviewers.
## Problem
Previously, the code checked only:
- `review.user.type === 'Bot'`
- `review.state === 'APPROVED' || 'CHANGES_REQUESTED'`
This meant any bot's approval (e.g., Dependabot security review) would
be dismissed when our action posted a new review.
## Solution
Added `isOwnReview()` function that checks the review body for our
signature patterns:
- "No issues found. Changes look good."
- "Found X issues..."
- "Please address the high-severity issues..."
- "Consider addressing the suggestions..."
- "Minor suggestions noted..."
Only reviews matching these patterns will be dismissed.
## Test plan
- [x] Updated test to include Dependabot/Renovate mock reviews
- [x] Verified only our reviews (101, 102) are dismissed
- [x] Verified other bot reviews (103, 104) are NOT dismissed
- [x] All 17 tests pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent e16daf3 commit 9e9539e
2 files changed
Lines changed: 44 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
849 | 849 | | |
850 | 850 | | |
851 | 851 | | |
852 | | - | |
| 852 | + | |
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
870 | 876 | | |
871 | 877 | | |
872 | 878 | | |
| |||
907 | 913 | | |
908 | 914 | | |
909 | 915 | | |
| 916 | + | |
910 | 917 | | |
911 | 918 | | |
912 | | - | |
913 | | - | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
914 | 924 | | |
915 | 925 | | |
916 | 926 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
92 | 116 | | |
93 | 117 | | |
94 | 118 | | |
| |||
101 | 125 | | |
102 | 126 | | |
103 | 127 | | |
| 128 | + | |
104 | 129 | | |
105 | | - | |
| 130 | + | |
106 | 131 | | |
107 | 132 | | |
108 | 133 | | |
| |||
0 commit comments