Use getOctokit(...) when getting the GitHub API client.

This commit is contained in:
Chris Gavin
2020-09-21 15:21:05 +01:00
parent 9ed519fa12
commit cc0eb452c7
3 changed files with 5 additions and 7 deletions

View File

@@ -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" }),