use @actions/github
This commit is contained in:
parent
9da537eb33
commit
0086c2ecdb
199 changed files with 95598 additions and 6141 deletions
15
lib/api-client.js
generated
15
lib/api-client.js
generated
|
|
@ -11,13 +11,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const octokit = __importStar(require("@octokit/rest"));
|
||||
const github = __importStar(require("@actions/github"));
|
||||
const console_log_level_1 = __importDefault(require("console-log-level"));
|
||||
const githubAPIURL = process.env["GITHUB_API_URL"] || "https://api.github.com";
|
||||
exports.client = new octokit.Octokit({
|
||||
auth: core.getInput("token"),
|
||||
baseUrl: githubAPIURL,
|
||||
userAgent: "CodeQL Action",
|
||||
log: console_log_level_1.default({ level: "debug" })
|
||||
});
|
||||
exports.getApiClient = function () {
|
||||
return new github.GitHub(core.getInput('token'), {
|
||||
userAgent: "CodeQL Action",
|
||||
log: console_log_level_1.default({ level: "debug" })
|
||||
});
|
||||
};
|
||||
//# sourceMappingURL=api-client.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue