Skip to content

Commit

Permalink
Merge pull request #66 from Laravel-Lang/andrey-helldar-patch-1
Browse files Browse the repository at this point in the history
Fixed processing of organization repositories taking into account pagination
  • Loading branch information
andrey-helldar authored Apr 1, 2024
2 parents adf1a41 + 4756bd5 commit 9071204
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Services/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@

namespace App\Services;

use Github\ResultPager;
use GrahamCampbell\GitHub\GitHubManager;

class Organization
{
public function __construct(
protected GitHubManager $github
protected GitHubManager $github,
protected ResultPager $paginator
) {}

public function repositories(string $organization): array
{
return $this->github->repositories()->org($organization);
return $this->paginator->fetchAll($this->github->repositories(), 'org', [$organization]);
}
}

0 comments on commit 9071204

Please sign in to comment.