diff --git a/funcs_utils.php b/funcs_utils.php index 5dcbc5c..c3f6a12 100644 --- a/funcs_utils.php +++ b/funcs_utils.php @@ -78,7 +78,7 @@ function supported_modules($cmsMajor) } /** - * Hardcoded list of additional repositories to standardise (e.g. silverstripe/gha-*) + * Hardcoded list of non-supported, additional repositories to standardise (e.g. silverstripe/gha-*) * * Repositories in this list should only have a single supported major version * This will only be included if the $cmsMajor is the CURRENT_CMS_MAJOR @@ -86,9 +86,19 @@ function supported_modules($cmsMajor) function extra_repositories() { $modules = []; - // iterating to page 7 should be enough to get all the repos well into the future - for ($i = 0; $i < 7; $i++) { - $json = github_api("https://api.github.com/orgs/silverstripe/repos?per_page=100&page=$i"); + // iterating to page 10 will be enough to get all the repos well into the future + for ($i = 0; $i < 10; $i++) { + $path = "_data/extra_repositories-$i.json"; + if (file_exists($path)) { + info("Reading local data from $path"); + $json = json_decode(file_get_contents($path), true); + } else { + $json = github_api("https://api.github.com/orgs/silverstripe/repos?per_page=100&page=$i"); + file_put_contents($path, json_encode($json, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)); + } + if (empty($json)) { + break; + } foreach ($json as $repo) { if ($repo['archived']) { continue; diff --git a/scripts/cms5/keepalive.php b/scripts/cms-any/keepalive.php similarity index 100% rename from scripts/cms5/keepalive.php rename to scripts/cms-any/keepalive.php diff --git a/scripts/cms-any/license.php b/scripts/cms-any/license.php index c7ada6b..c25e36d 100644 --- a/scripts/cms-any/license.php +++ b/scripts/cms-any/license.php @@ -12,15 +12,15 @@ modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/scripts/cms5/merge-ups.php b/scripts/cms-any/merge-ups.php similarity index 100% rename from scripts/cms5/merge-ups.php rename to scripts/cms-any/merge-ups.php diff --git a/scripts/cms-any/update-js.php b/scripts/cms-any/update-js.php new file mode 100644 index 0000000..ad865c3 --- /dev/null +++ b/scripts/cms-any/update-js.php @@ -0,0 +1,33 @@ +