File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8787 repo: context.repo.repo,
8888 issue_number: pr.number,
8989 per_page: 100,
90+ sort: 'created',
91+ direction: 'desc',
9092 });
9193
9294 const conflictComments = comments.filter(c =>
@@ -98,11 +100,11 @@ jobs:
98100 if (conflictComments.length === 0) {
99101 shouldComment = true;
100102 } else {
101- const lastComment = conflictComments[conflictComments.length - 1 ];
102- const lastCommentTime = new Date(lastComment .created_at).getTime();
103+ const latestComment = conflictComments[0 ];
104+ const latestCommentTime = new Date(latestComment .created_at).getTime();
103105 const nowTime = new Date().getTime();
104106 const TWENTY_FOUR_HOURS_MS = 24 * 60 * 60 * 1000;
105- if (nowTime - lastCommentTime >= TWENTY_FOUR_HOURS_MS) {
107+ if (nowTime - latestCommentTime >= TWENTY_FOUR_HOURS_MS) {
106108 shouldComment = true;
107109 }
108110 }
You can’t perform that action at this time.
0 commit comments