mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
ci/github-script/reviews: detect reviews belonging to commits.js
See comment, but TLDR this is for backwards-compatibility. (See 479628, where it failed to dismiss after fixing.) We don't bother with `prepare.js` because it always errors (and so should never be dismissed). I have simply added the needed comments to each of `check-target-branch.js`'s pre-existing reviews, because there are so few.
This commit is contained in:
parent
948fb41b76
commit
7a74549a85
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue