Skip to content

Commit 2bc9f00

Browse files
Hit raw.githubusercontent.com to work around rate limiting
1 parent acd0b50 commit 2bc9f00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Downloader.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
class Downloader
3030
{
3131
private const DEFAULT_ENDPOINTS = [
32-
'https://api.github.com/repos/symfony/recipes/contents/index.json?ref=flex/main',
33-
'https://api.github.com/repos/symfony/recipes-contrib/contents/index.json?ref=flex/main',
32+
'https://raw.githubusercontent.com/symfony/recipes/flex/main/index.json',
33+
'https://raw.githubusercontent.com/symfony/recipes-contrib/flex/main/index.json',
3434
];
3535
private const MAX_LENGTH = 1000;
3636

@@ -416,6 +416,7 @@ private function initialize()
416416
private static function generateCacheKey(string $url): string
417417
{
418418
$url = preg_replace('{^https://api.github.com/repos/([^/]++/[^/]++)/contents/}', '$1/', $url);
419+
$url = preg_replace('{^https://raw.githubusercontent.com/([^/]++/[^/]++)/}', '$1/', $url);
419420

420421
return preg_replace('{[^a-z0-9.]}i', '-', $url);
421422
}

0 commit comments

Comments
 (0)