Skip to content

Commit

Permalink
Use getOctokit(...) when getting the GitHub API client.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gavin committed Sep 21, 2020
1 parent 9ed519f commit cc0eb45
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -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";

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

0 comments on commit cc0eb45

Please sign in to comment.