diff --git a/package.json b/package.json index f9b50e2b..9f6fd774 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@technote-space/github-action-test-helper", - "version": "0.7.7", + "version": "0.7.8", "description": "Test helper for GitHub Actions.", "keywords": [ "github", diff --git a/src/types.ts b/src/types.ts index 6369cf4c..c3684747 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,4 @@ import {GitHub} from '@actions/github/lib/utils'; +import {RestEndpointMethods} from '@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types'; -export type Octokit = InstanceType; +export type Octokit = InstanceType & RestEndpointMethods; diff --git a/src/utils.ts b/src/utils.ts index bef3f982..238fd8b4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -176,4 +176,4 @@ export const testProperties = (object: any, checks: { [key: string]: any }): voi }); }; -export const getOctokit = (token?: string): Octokit => getOctokitInstance(token ?? 'test-token'); +export const getOctokit = (token?: string): Octokit => getOctokitInstance(token ?? 'test-token') as Octokit;