Skip to content

Commit

Permalink
Fetch 100 releases at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
villfa authored and theseer committed Dec 29, 2021
1 parent d273ec7 commit 28020bd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/services/resolver/PharIoAliasResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function resolve(RequestedPhar $requestedPhar): SourceRepository {

try {
$source = $this->getSourcesList()->getSourceForAlias($requestedPhar->getAlias());
$file = $this->fileDownloader->download($source->getUrl());
$file = $this->fileDownloader->download($this->getUrl($source));
} catch (SourcesListException $e) {
return $this->tryNext($requestedPhar);
}
Expand Down Expand Up @@ -68,4 +68,14 @@ protected function getSourcesList(): SourcesList {

return $this->sources;
}

private function getUrl(Source $source): Url {
$url = $source->getUrl();

if ($source->getType() === 'github') {
$url = $url->withParams(['per_page' => 100]);
}

return $url;
}
}

0 comments on commit 28020bd

Please sign in to comment.