From b08f07db6df6d6f80dd41e2a6d573cd897c8b05b Mon Sep 17 00:00:00 2001 From: jmjaffe37 Date: Wed, 1 Jul 2026 14:24:20 -0700 Subject: [PATCH] Now using a 'raw.githubusercontent.com' link to avoid rate limitting --- dist/setup/index.js | 5 ++--- src/distributions/microsoft/installer.ts | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index f40f5bab..621824af 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -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; } diff --git a/src/distributions/microsoft/installer.ts b/src/distributions/microsoft/installer.ts index a989e4ab..916846b1 100644 --- a/src/distributions/microsoft/installer.ts +++ b/src/distributions/microsoft/installer.ts @@ -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 | null = null; @@ -138,7 +135,7 @@ export class MicrosoftDistributions extends JavaBase { } try { - response = await this.http.getJson(fileUrl, headers); + response = await this.http.getJson(fileUrl); if (!response.result) { return null; }