mirror of https://github.com/actions/toolkit
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 #644pull/980/head
parent
daf8bb0060
commit
584c6fe314
|
@ -593,7 +593,8 @@ export async function getManifestFromRepo(
|
||||||
branch = 'master'
|
branch = 'master'
|
||||||
): Promise<IToolRelease[]> {
|
): Promise<IToolRelease[]> {
|
||||||
let releases: 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 http: httpm.HttpClient = new httpm.HttpClient('tool-cache')
|
||||||
const headers: IHeaders = {}
|
const headers: IHeaders = {}
|
||||||
|
|
Loading…
Reference in New Issue