Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use getOctokit(...) when getting the GitHub API client.
Chris Gavin committed Sep 21, 2020

Unverified

No user is associated with the committer email.
1 parent 9ed519f commit cc0eb45
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions lib/api-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/api-client.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/api-client.ts
@@ -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" }),

0 comments on commit cc0eb45

Please sign in to comment.