Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 424ecb9

Browse files
committed
Fix ping stale reviewers on subsequent reviews
1 parent 0f7f942 commit 424ecb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compute-pr-actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as Comments from "./comments";
22
import * as urls from "./urls";
33
import { PrInfo, BotResult, FileInfo } from "./pr-info";
44
import { ReviewInfo } from "./pr-info";
5-
import { noNullish, flatten, unique, sameUser, min, sha256, abbrOid } from "./util/util";
5+
import { noNullish, flatten, unique, sameUser, max, sha256, abbrOid } from "./util/util";
66
import * as dayjs from "dayjs";
77
import * as advancedFormat from "dayjs/plugin/advancedFormat";
88
dayjs.extend(advancedFormat);
@@ -345,7 +345,7 @@ export function process(prInfo: BotResult,
345345
}
346346
// Ping stale reviewers if any
347347
if (info.staleReviews.length > 0) {
348-
const { abbrOid } = min(info.staleReviews, (l, r) => +l.date - +r.date)!;
348+
const { abbrOid } = max(info.staleReviews, (l, r) => +l.date - +r.date)!;
349349
const reviewers = info.staleReviews.map(r => r.reviewer);
350350
post(Comments.PingStaleReviewer(abbrOid, reviewers));
351351
}

0 commit comments

Comments
 (0)