Skip to content

Commit

Permalink
Fetch less PRs by default from gitlab (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Jun 28, 2022
1 parent 265b550 commit 1133809
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Providers/Gitlab.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ public function getPrsNamed(Slug $slug) : array
$pager = new ResultPager($this->client);
$api = $this->client->api('mr');
$method = 'all';
$prs = $pager->fetchAll($api, $method, [self::getProjectId($slug->getUrl())]);
$prs = $pager->fetchAll($api, $method, [self::getProjectId($slug->getUrl()), [
'state' => 'opened',
]]);
$prs_named = [];
foreach ($prs as $pr) {
if ($pr['state'] != 'opened') {
if ($pr['state'] !== 'opened') {
continue;
}
// Now get the last commits for this branch.
Expand Down

0 comments on commit 1133809

Please sign in to comment.