mirror of
https://github.com/actions/github-script.git
synced 2026-03-28 00:45:11 +00:00
fix: use typeof getOctokit instead of deep @octokit/core import, rebuild dist/
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as exec from '@actions/exec'
|
||||
import {getOctokit} from '@actions/github'
|
||||
import {Context} from '@actions/github/lib/context'
|
||||
import {GitHub} from '@actions/github/lib/utils'
|
||||
import * as glob from '@actions/glob'
|
||||
import * as io from '@actions/io'
|
||||
import type {OctokitOptions, OctokitPlugin} from '@octokit/core/types'
|
||||
|
||||
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
||||
|
||||
@@ -13,11 +13,7 @@ export declare type AsyncFunctionArguments = {
|
||||
core: typeof core
|
||||
github: InstanceType<typeof GitHub>
|
||||
octokit: InstanceType<typeof GitHub>
|
||||
getOctokit: (
|
||||
token: string,
|
||||
options?: OctokitOptions,
|
||||
...additionalPlugins: OctokitPlugin[]
|
||||
) => InstanceType<typeof GitHub>
|
||||
getOctokit: typeof getOctokit
|
||||
exec: typeof exec
|
||||
glob: typeof glob
|
||||
io: typeof io
|
||||
|
||||
2
types/async-function.d.ts
vendored
2
types/async-function.d.ts
vendored
@@ -1,6 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
import * as core from '@actions/core';
|
||||
import * as exec from '@actions/exec';
|
||||
import { getOctokit } from '@actions/github';
|
||||
import { Context } from '@actions/github/lib/context';
|
||||
import { GitHub } from '@actions/github/lib/utils';
|
||||
import * as glob from '@actions/glob';
|
||||
@@ -10,6 +11,7 @@ export declare type AsyncFunctionArguments = {
|
||||
core: typeof core;
|
||||
github: InstanceType<typeof GitHub>;
|
||||
octokit: InstanceType<typeof GitHub>;
|
||||
getOctokit: typeof getOctokit;
|
||||
exec: typeof exec;
|
||||
glob: typeof glob;
|
||||
io: typeof io;
|
||||
|
||||
Reference in New Issue
Block a user