mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 17:50:07 +08:00
18 lines
761 B
JavaScript
18 lines
761 B
JavaScript
import { Octokit as Core } from "@octokit/core";
|
|
import { requestLog } from "@octokit/plugin-request-log";
|
|
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
|
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
|
import { VERSION } from "./version";
|
|
export const Octokit = Core.plugin([
|
|
// Workaround to prevent TypeScript from widening the inferred return type of
|
|
// plugins passed to Octokit, which would result in type information (e.g.
|
|
// methods provided by plugins) not being added to Octokit instances.
|
|
//
|
|
// See https://github.com/octokit/core.js/issues/51#issuecomment-596846088
|
|
requestLog,
|
|
restEndpointMethods,
|
|
paginateRest
|
|
]).defaults({
|
|
userAgent: `octokit-rest.js/${VERSION}`
|
|
});
|