File tree Expand file tree Collapse file tree
src/distributions/microsoft Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80008,14 +80008,13 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
8000880008 const branch = 'main';
8000980009 const filePath = 'general_info/microsoft-openjdk-versions.json';
8001080010 let releases = null;
80011- const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`;
80012- const headers = (0, util_1.getGitHubHttpHeaders)();
80011+ const fileUrl = `https://raw.githubusercontent.com/${owner}/${repository}/refs/heads/${branch}/${filePath}`;
8001380012 let response = null;
8001480013 if (core.isDebug()) {
8001580014 console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console
8001680015 }
8001780016 try {
80018- response = yield this.http.getJson(fileUrl, headers );
80017+ response = yield this.http.getJson(fileUrl);
8001980018 if (!response.result) {
8002080019 return null;
8002180020 }
Original file line number Diff line number Diff line change 77import {
88 extractJdkFile ,
99 getDownloadArchiveExtension ,
10- getGitHubHttpHeaders ,
1110 renameWinArchive
1211} from '../../util' ;
1312import * as gpg from '../../gpg' ;
@@ -127,9 +126,7 @@ export class MicrosoftDistributions extends JavaBase {
127126 const branch = 'main' ;
128127 const filePath = 'general_info/microsoft-openjdk-versions.json' ;
129128 let releases : tc . IToolRelease [ ] | null = null ;
130- const fileUrl = `https://api.github.com/repos/${ owner } /${ repository } /contents/${ filePath } ?ref=${ branch } ` ;
131-
132- const headers = getGitHubHttpHeaders ( ) ;
129+ const fileUrl = `https://raw.githubusercontent.com/${ owner } /${ repository } /refs/heads/${ branch } /${ filePath } ` ;
133130
134131 let response : TypedResponse < tc . IToolRelease [ ] > | null = null ;
135132
@@ -138,7 +135,7 @@ export class MicrosoftDistributions extends JavaBase {
138135 }
139136
140137 try {
141- response = await this . http . getJson < tc . IToolRelease [ ] > ( fileUrl , headers ) ;
138+ response = await this . http . getJson < tc . IToolRelease [ ] > ( fileUrl ) ;
142139 if ( ! response . result ) {
143140 return null ;
144141 }
You can’t perform that action at this time.
0 commit comments