use @actions/github
This commit is contained in:
parent
9da537eb33
commit
0086c2ecdb
199 changed files with 95598 additions and 6141 deletions
|
|
@ -1,11 +1,12 @@
|
|||
import * as core from "@actions/core";
|
||||
import * as octokit from "@octokit/rest";
|
||||
import * as github from "@actions/github";
|
||||
import consoleLogLevel from "console-log-level";
|
||||
|
||||
const githubAPIURL = process.env["GITHUB_API_URL"] || "https://api.github.com";
|
||||
export const client = new octokit.Octokit({
|
||||
auth: core.getInput("token"),
|
||||
baseUrl: githubAPIURL,
|
||||
userAgent: "CodeQL Action",
|
||||
log: consoleLogLevel({ level: "debug" })
|
||||
});
|
||||
export const getApiClient = function() {
|
||||
return new github.GitHub(
|
||||
core.getInput('token'),
|
||||
{
|
||||
userAgent: "CodeQL Action",
|
||||
log: consoleLogLevel({ level: "debug" })
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue