Adjust plan for pagination safeguard scope

This commit is contained in:
copilot-swe-agent[bot] 2026-06-03 15:51:14 +00:00 committed by GitHub
parent 7ee69becdc
commit a22487fd8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

6
dist/setup/index.js vendored
View File

@ -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'];