Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions lib/pr_checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ const FAST_TRACK_RE = /^Fast-track has been requested by @(.+?)\. Please 👍 to
const FAST_TRACK_MIN_APPROVALS = 2;
const GIT_CONFIG_GUIDE_URL = 'https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork';

// eslint-disable-next-line no-extend-native
Array.prototype.findLastIndex ??= function findLastIndex(fn) {
const reversedIndex = Reflect.apply(
Array.prototype.findIndex,
this.slice().reverse(),
arguments);
return reversedIndex === -1 ? -1 : this.length - reversedIndex - 1;
};

export default class PRChecker {
/**
* @param {{}} cli
Expand All @@ -49,7 +40,7 @@ export default class PRChecker {
this.request = request;
this.data = data;
const {
pr, reviewers, comments, reviews, commits, collaborators
pr, reviewers, comments, reviews, commits
} = data;
this.reviewers = reviewers;
this.pr = pr;
Expand All @@ -61,9 +52,6 @@ export default class PRChecker {
this.reviews = reviews;
this.commits = commits;
this.argv = argv;
this.collaboratorEmails = new Set(
Array.from(collaborators).map((c) => c[1].email)
);
}

get waitTimeSingleApproval() {
Expand Down
Loading