diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-09 16:06:54 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-09 16:06:54 +0200 |
commit | 0874ca61bc4b0f3250f994a69dcac69973deef22 (patch) | |
tree | 73e13b065515bd7689660accf6fb28fc42ac118b | |
parent | 2b53d9566fea687ca7734d1db1163bab9144e3c9 (diff) | |
download | horses-0874ca61bc4b0f3250f994a69dcac69973deef22.tar.gz horses-0874ca61bc4b0f3250f994a69dcac69973deef22.tar.bz2 horses-0874ca61bc4b0f3250f994a69dcac69973deef22.zip |
Updated 2 files (automated)
-rw-r--r-- | includes/refresh.php | 23 | ||||
-rw-r--r-- | includes/version.txt | 2 |
2 files changed, 22 insertions, 3 deletions
diff --git a/includes/refresh.php b/includes/refresh.php index b6e95df..69ab51d 100644 --- a/includes/refresh.php +++ b/includes/refresh.php @@ -6,7 +6,17 @@ $descriptions = json_decode(file_get_contents("./descriptions.json"), true); $projects = []; print("Gitea > equestria.dev\n"); -$gitea = json_decode(file_get_contents("https://git.equestria.dev/api/v1/orgs/equestria.dev/repos?limit=1000&token=" . $secrets["gitea"], false, stream_context_create(["ssl"=>["verify_peer"=>false,"verify_peer_name"=>false]])), true); + +$gitea = []; +$page = 1; +$current = json_decode(file_get_contents("https://git.equestria.dev/api/v1/orgs/equestria.dev/repos?limit=1000&page=$page&token=" . $secrets["gitea"], false, stream_context_create(["ssl"=>["verify_peer"=>false,"verify_peer_name"=>false]])), true); +array_push($gitea, ...$current); + +while (count($current) > 0) { + $page++; + $current = json_decode(file_get_contents("https://git.equestria.dev/api/v1/orgs/equestria.dev/repos?limit=1000&page=$page&token=" . $secrets["gitea"], false, stream_context_create(["ssl"=>["verify_peer"=>false,"verify_peer_name"=>false]])), true); + array_push($gitea, ...$current); +} foreach ($gitea as $project) { if ($project["private"]) continue; @@ -44,7 +54,16 @@ foreach ($gitea as $project) { print("Gitea > minteck.org\n"); -$minteckorg = json_decode(file_get_contents("https://git.equestria.dev/api/v1/orgs/minteck.org/repos?limit=1000&token=" . $secrets["gitea"], false, stream_context_create(["ssl"=>["verify_peer"=>false,"verify_peer_name"=>false]])), true); +$minteckorg = []; +$page = 1; +$current = json_decode(file_get_contents("https://git.equestria.dev/api/v1/orgs/minteck.org/repos?limit=1000&page=$page&token=" . $secrets["gitea"], false, stream_context_create(["ssl"=>["verify_peer"=>false,"verify_peer_name"=>false]])), true); +array_push($minteckorg, ...$current); + +while (count($current) > 0) { + $page++; + $current = json_decode(file_get_contents("https://git.equestria.dev/api/v1/orgs/minteck.org/repos?limit=1000&page=$page&token=" . $secrets["gitea"], false, stream_context_create(["ssl"=>["verify_peer"=>false,"verify_peer_name"=>false]])), true); + array_push($minteckorg, ...$current); +} foreach ($minteckorg as $project) { if ($project["private"]) continue; diff --git a/includes/version.txt b/includes/version.txt index 10d0569..b1d1df7 100644 --- a/includes/version.txt +++ b/includes/version.txt @@ -1 +1 @@ -12.3.3
\ No newline at end of file +12.4.0
\ No newline at end of file |