mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 14:40:10 +08:00
Use getOctokit(...) when getting the GitHub API client.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as github from "@actions/github/lib/utils";
|
||||
import * as github from "@actions/github";
|
||||
import consoleLogLevel from "console-log-level";
|
||||
import * as path from "path";
|
||||
|
||||
@@ -13,8 +13,7 @@ export const getApiClient = function (
|
||||
if (isLocalRun() && !allowLocalRun) {
|
||||
throw new Error("Invalid API call in local run");
|
||||
}
|
||||
return new github.GitHub({
|
||||
auth: githubAuth,
|
||||
return github.getOctokit(githubAuth, {
|
||||
baseUrl: getApiUrl(githubUrl),
|
||||
userAgent: "CodeQL Action",
|
||||
log: consoleLogLevel({ level: "debug" }),
|
||||
|
||||
Reference in New Issue
Block a user