Sort reviews by ID rather than date so there cannot be a tie.
This commit is contained in:
Родитель
f8d60d9344
Коммит
b619a82d2e
|
@ -37709,12 +37709,12 @@ class GitHubProvider {
|
|||
pull_number: prNumber,
|
||||
});
|
||||
|
||||
// filter the reviews to only those from the current user and sort them by date descending
|
||||
// filter the reviews to only those from the current user and sort them by date (id) descending
|
||||
const userReviews = reviews
|
||||
.filter(
|
||||
(review) => review.user.login.toLowerCase() === login.toLowerCase(),
|
||||
)
|
||||
.sort((a, b) => new Date(b.submitted_at) - new Date(a.submitted_at));
|
||||
.sort((a, b) => b.id - a.id);
|
||||
|
||||
// attempt to get the latest review from the user (if there are no reviews from the user, this will be undefined)
|
||||
const latestReview = userReviews[0];
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -55,12 +55,12 @@ class GitHubProvider {
|
|||
pull_number: prNumber,
|
||||
});
|
||||
|
||||
// filter the reviews to only those from the current user and sort them by date descending
|
||||
// filter the reviews to only those from the current user and sort them by date (id) descending
|
||||
const userReviews = reviews
|
||||
.filter(
|
||||
(review) => review.user.login.toLowerCase() === login.toLowerCase(),
|
||||
)
|
||||
.sort((a, b) => new Date(b.submitted_at) - new Date(a.submitted_at));
|
||||
.sort((a, b) => b.id - a.id);
|
||||
|
||||
// attempt to get the latest review from the user (if there are no reviews from the user, this will be undefined)
|
||||
const latestReview = userReviews[0];
|
||||
|
|
Загрузка…
Ссылка в новой задаче