Skip to content

Commit a7dc0e4

Browse files
committed
fix: use typeof getOctokit instead of deep @octokit/core import, rebuild dist/
1 parent 00afa0f commit a7dc0e4

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/async-function.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import * as core from '@actions/core'
22
import * as exec from '@actions/exec'
3+
import {getOctokit} from '@actions/github'
34
import {Context} from '@actions/github/lib/context'
45
import {GitHub} from '@actions/github/lib/utils'
56
import * as glob from '@actions/glob'
67
import * as io from '@actions/io'
7-
import type {OctokitOptions, OctokitPlugin} from '@octokit/core/types'
88

99
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
1010

@@ -13,11 +13,7 @@ export declare type AsyncFunctionArguments = {
1313
core: typeof core
1414
github: InstanceType<typeof GitHub>
1515
octokit: InstanceType<typeof GitHub>
16-
getOctokit: (
17-
token: string,
18-
options?: OctokitOptions,
19-
...additionalPlugins: OctokitPlugin[]
20-
) => InstanceType<typeof GitHub>
16+
getOctokit: typeof getOctokit
2117
exec: typeof exec
2218
glob: typeof glob
2319
io: typeof io

types/async-function.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// <reference types="node" />
22
import * as core from '@actions/core';
33
import * as exec from '@actions/exec';
4+
import { getOctokit } from '@actions/github';
45
import { Context } from '@actions/github/lib/context';
56
import { GitHub } from '@actions/github/lib/utils';
67
import * as glob from '@actions/glob';
@@ -10,6 +11,7 @@ export declare type AsyncFunctionArguments = {
1011
core: typeof core;
1112
github: InstanceType<typeof GitHub>;
1213
octokit: InstanceType<typeof GitHub>;
14+
getOctokit: typeof getOctokit;
1315
exec: typeof exec;
1416
glob: typeof glob;
1517
io: typeof io;

0 commit comments

Comments
 (0)