ci/github-script/reviews: detect reviews belonging to commits.js (#484237)

This commit is contained in:
Philip Taron
2026-01-27 00:41:44 +00:00
committed by GitHub
+7 -1
View File
@@ -66,7 +66,13 @@ async function dismissReviews({ github, context, core, dry, reviewKey }) {
changesRequestedReviews.every(
(review) =>
commentResolvedRegex.test(review.body) ||
(reviewKey && reviewKeyRegex.test(review.body)),
(reviewKey && reviewKeyRegex.test(review.body)) ||
// If we are called by check-commits and the review body is clearly
// from `commits.js`, then we can safely dismiss the review.
// This helps with pre-existing reviews (before the comments were added).
(reviewKey &&
reviewKey === 'check-commits' &&
review.body.includes('PR / Check / cherry-pick')),
)
) {
reviewsToDismiss = changesRequestedReviews