Remove a call to getActionsApiClient
This commit is contained in:
parent
8a821a9c35
commit
09fb3ec514
3 changed files with 12 additions and 7 deletions
6
lib/codeql.js
generated
6
lib/codeql.js
generated
|
|
@ -48,7 +48,7 @@ function getCodeQLActionRepository(mode) {
|
|||
const relativeScriptPathParts = relativeScriptPath.split(path.sep);
|
||||
return relativeScriptPathParts[0] + "/" + relativeScriptPathParts[1];
|
||||
}
|
||||
async function getCodeQLBundleDownloadURL(githubUrl, mode, logger) {
|
||||
async function getCodeQLBundleDownloadURL(githubAuth, githubUrl, mode, logger) {
|
||||
const codeQLActionRepository = getCodeQLActionRepository(mode);
|
||||
const potentialDownloadSources = [
|
||||
// This GitHub instance, and this Action.
|
||||
|
|
@ -69,7 +69,7 @@ async function getCodeQLBundleDownloadURL(githubUrl, mode, logger) {
|
|||
}
|
||||
let [repositoryOwner, repositoryName] = repository.split("/");
|
||||
try {
|
||||
const release = await api.getActionsApiClient().repos.getReleaseByTag({
|
||||
const release = await api.getApiClient(githubAuth, githubUrl).repos.getReleaseByTag({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
tag: CODEQL_BUNDLE_VERSION
|
||||
|
|
@ -116,7 +116,7 @@ async function setupCodeQL(codeqlURL, githubAuth, githubUrl, tempDir, toolsDir,
|
|||
}
|
||||
else {
|
||||
if (!codeqlURL) {
|
||||
codeqlURL = await getCodeQLBundleDownloadURL(githubUrl, mode, logger);
|
||||
codeqlURL = await getCodeQLBundleDownloadURL(githubAuth, githubUrl, mode, logger);
|
||||
}
|
||||
const headers = { accept: 'application/octet-stream' };
|
||||
// We only want to provide an authorization header if we are downloading
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue