Unverified Commit 9833ce18 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

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

parents 96e254ac 7a74549a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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