@@ -38,7 +38,7 @@ public function open(Repository $repository, string $title, string $body, array
38
38
];
39
39
40
40
$ issueNumber = null ;
41
- $ existingIssues = $ this ->searchApi ->issues (sprintf ('repo:%s "%s" is:open author:%s ' , $ repository ->getFullName (), $ title , $ this ->botUsername ));
41
+ $ existingIssues = $ this ->searchApi ->issues (sprintf ('repo:%s "%s" is:open author:%s ' , $ repository ->getFullName (), $ title , $ this ->botUsername ), ' updated ' , ' desc ' , [ ' per_page ' => 100 ] );
42
42
foreach ($ existingIssues ['items ' ] ?? [] as $ issue ) {
43
43
$ issueNumber = $ issue ['number ' ];
44
44
}
@@ -53,7 +53,7 @@ public function open(Repository $repository, string $title, string $body, array
53
53
54
54
public function lastCommentWasMadeByBot (Repository $ repository , $ number ): bool
55
55
{
56
- $ allComments = $ this ->issueCommentApi ->all ($ repository ->getVendor (), $ repository ->getName (), $ number );
56
+ $ allComments = $ this ->issueCommentApi ->all ($ repository ->getVendor (), $ repository ->getName (), $ number, [ ' per_page ' => 100 ] );
57
57
$ lastComment = $ allComments [count ($ allComments ) - 1 ] ?? [];
58
58
59
59
return $ this ->botUsername === ($ lastComment ['user ' ]['login ' ] ?? null );
@@ -74,7 +74,7 @@ public function hasActivity(Repository $repository, $number): bool
74
74
$ reviewComments = [];
75
75
}
76
76
77
- $ all = array_merge ($ reviewComments , $ this ->issueCommentApi ->all ($ repository ->getVendor (), $ repository ->getName (), $ number ));
77
+ $ all = array_merge ($ reviewComments , $ this ->issueCommentApi ->all ($ repository ->getVendor (), $ repository ->getName (), $ number, [ ' per_page ' => 100 ] ));
78
78
foreach ($ all as $ comment ) {
79
79
if (!in_array ($ comment ['user ' ]['login ' ], [$ author , $ this ->botUsername ])) {
80
80
return true ;
@@ -109,7 +109,7 @@ public function commentOnIssue(Repository $repository, $issueNumber, string $com
109
109
110
110
public function findStaleIssues (Repository $ repository , \DateTimeImmutable $ noUpdateAfter ): array
111
111
{
112
- $ issues = $ this ->searchApi ->issues (sprintf ('repo:%s is:issue -label:"Keep open" is:open updated:<%s ' , $ repository ->getFullName (), $ noUpdateAfter ->format ('Y-m-d ' )));
112
+ $ issues = $ this ->searchApi ->issues (sprintf ('repo:%s is:issue -label:"Keep open" is:open updated:<%s ' , $ repository ->getFullName (), $ noUpdateAfter ->format ('Y-m-d ' )), ' updated ' , ' desc ' , [ ' per_page ' => 100 ] );
113
113
114
114
return $ issues ['items ' ] ?? [];
115
115
}
0 commit comments