Skip to content

Commit 1ac0c46

Browse files
committed
Use review marker only for stale review dismissal
1 parent 3737488 commit 1ac0c46

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

scripts/comment-pr-findings.bun.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ describe('comment-pr-findings.js', () => {
10261026
id: 201,
10271027
state: 'APPROVED',
10281028
user: { type: 'Bot' },
1029-
body: '📋 **PR Summary:**\nThis PR adds auth.\n\n---\n\nNo issues found. Changes look good.'
1029+
body: '<!-- nutrient-code-review-action -->\nNo issues found. Changes look good.'
10301030
}
10311031
];
10321032

scripts/comment-pr-findings.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -103,27 +103,7 @@ function addReactionsToReview(reviewId) {
103103
// Check if a review was posted by this action
104104
function isOwnReview(review) {
105105
if (!review.body) return false;
106-
if (review.body.includes(REVIEW_MARKER)) return true;
107-
108-
// Check for our review summary patterns
109-
const ownPatterns = [
110-
PR_SUMMARY_MARKER,
111-
'No issues found. Changes look good.',
112-
/^Found \d+ .+ issues?\./,
113-
'Please address the high-severity issues before merging.',
114-
'Consider addressing the suggestions in the comments.',
115-
'Minor suggestions noted in comments.'
116-
];
117-
118-
for (const pattern of ownPatterns) {
119-
if (pattern instanceof RegExp) {
120-
if (pattern.test(review.body)) return true;
121-
} else {
122-
if (review.body.includes(pattern)) return true;
123-
}
124-
}
125-
126-
return false;
106+
return review.body.includes(REVIEW_MARKER);
127107
}
128108

129109
// Find an existing review posted by this action

0 commit comments

Comments
 (0)