Now using a 'raw.githubusercontent.com' link to avoid rate limitting

This commit is contained in:
jmjaffe37 2026-07-01 14:24:20 -07:00
parent a8f7bcc45a
commit b08f07db6d
No known key found for this signature in database
GPG Key ID: 6EEC81E9469C365F
2 changed files with 4 additions and 8 deletions

5
dist/setup/index.js vendored
View File

@ -80008,14 +80008,13 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
const branch = 'main';
const filePath = 'general_info/microsoft-openjdk-versions.json';
let releases = null;
const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`;
const headers = (0, util_1.getGitHubHttpHeaders)();
const fileUrl = `https://raw.githubusercontent.com/${owner}/${repository}/refs/heads/${branch}/${filePath}`;
let response = null;
if (core.isDebug()) {
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console
}
try {
response = yield this.http.getJson(fileUrl, headers);
response = yield this.http.getJson(fileUrl);
if (!response.result) {
return null;
}

View File

@ -7,7 +7,6 @@ import {
import {
extractJdkFile,
getDownloadArchiveExtension,
getGitHubHttpHeaders,
renameWinArchive
} from '../../util';
import * as gpg from '../../gpg';
@ -127,9 +126,7 @@ export class MicrosoftDistributions extends JavaBase {
const branch = 'main';
const filePath = 'general_info/microsoft-openjdk-versions.json';
let releases: tc.IToolRelease[] | null = null;
const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`;
const headers = getGitHubHttpHeaders();
const fileUrl = `https://raw.githubusercontent.com/${owner}/${repository}/refs/heads/${branch}/${filePath}`;
let response: TypedResponse<tc.IToolRelease[]> | null = null;
@ -138,7 +135,7 @@ export class MicrosoftDistributions extends JavaBase {
}
try {
response = await this.http.getJson<tc.IToolRelease[]>(fileUrl, headers);
response = await this.http.getJson<tc.IToolRelease[]>(fileUrl);
if (!response.result) {
return null;
}