mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
use @actions/github
This commit is contained in:
@@ -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" })
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user