Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

spatie/spatie.be

493 stars
1 code files
View spatie/spatie.be on GitHub

app/Services/GitHub/GitHubApi.php

Open in GitHub
use Github\ResultPager;
 
class GitHubApi
{
//
public function fetchPublicRepositories(string $username): Collection
{
$api = $this->client->api('organization');
 
$paginator = new ResultPager($this->client);
 
$repositories = $paginator->fetchAll($api, 'repositories', [$username]);
 
return collect($repositories)->filter(function ($repo): bool {
return $repo['private'] === false;
});
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.