Use getOctokit(...) when getting the GitHub API client.
This commit is contained in:
parent
9ed519fa12
commit
cc0eb452c7
3 changed files with 5 additions and 7 deletions
5
lib/api-client.js
generated
5
lib/api-client.js
generated
|
|
@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const github = __importStar(require("@actions/github/lib/utils"));
|
||||
const github = __importStar(require("@actions/github"));
|
||||
const console_log_level_1 = __importDefault(require("console-log-level"));
|
||||
const path = __importStar(require("path"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
|
|
@ -19,8 +19,7 @@ exports.getApiClient = function (githubAuth, githubUrl, allowLocalRun = false) {
|
|||
if (util_1.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: console_log_level_1.default({ level: "debug" }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue