mirror of
https://github.com/actions/setup-java.git
synced 2026-06-17 16:57:58 +00:00
Adjust plan for pagination safeguard scope
This commit is contained in:
parent
7ee69becdc
commit
a22487fd8c
6
dist/setup/index.js
vendored
6
dist/setup/index.js
vendored
@ -78728,6 +78728,7 @@ const semver_1 = __importDefault(__nccwpck_require__(11383));
|
||||
const base_installer_1 = __nccwpck_require__(59741);
|
||||
const util_1 = __nccwpck_require__(92629);
|
||||
const http_client_1 = __nccwpck_require__(96255);
|
||||
const MAX_PAGINATION_PAGES = 1000;
|
||||
class JetBrainsDistribution extends base_installer_1.JavaBase {
|
||||
constructor(installerOptions) {
|
||||
super('JetBrains', installerOptions);
|
||||
@ -78780,7 +78781,7 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
|
||||
let page_index = 1;
|
||||
const rawVersions = [];
|
||||
const bearerToken = process.env.GITHUB_TOKEN;
|
||||
while (true) {
|
||||
while (page_index <= MAX_PAGINATION_PAGES) {
|
||||
const requestArguments = `per_page=100&page=${page_index}`;
|
||||
const requestHeaders = {};
|
||||
if (bearerToken) {
|
||||
@ -78804,6 +78805,9 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
|
||||
rawVersions.push(...paginationPage);
|
||||
page_index++;
|
||||
}
|
||||
if (page_index > MAX_PAGINATION_PAGES) {
|
||||
core.warning(`Reached pagination safeguard limit (${MAX_PAGINATION_PAGES} pages) while listing JetBrains runtime releases.`);
|
||||
}
|
||||
if (this.stable) {
|
||||
// Add versions not available from the API but are downloadable
|
||||
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user