1
0
Fork 0

fix(tool-cache): support enterprise instances

Remove hard code api.github.com reference in tool-cache so that it works
when used in GitHub Enterprise instances.

Fixes #644
pull/980/head
Steven Hartland 2022-01-18 18:16:09 +00:00
parent daf8bb0060
commit 584c6fe314
1 changed files with 2 additions and 1 deletions

View File

@ -593,7 +593,8 @@ export async function getManifestFromRepo(
branch = 'master'
): Promise<IToolRelease[]> {
let releases: IToolRelease[] = []
const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`
const base = process.env['GITHUB_API_URL'] || 'https://api.github.com'
const treeUrl = `${base}/repos/${owner}/${repo}/git/trees/${branch}`
const http: httpm.HttpClient = new httpm.HttpClient('tool-cache')
const headers: IHeaders = {}