From 24b982d65f845de2500924fcde0805bea8d4b3a6 Mon Sep 17 00:00:00 2001 From: rapsealk Date: Mon, 19 Feb 2024 11:13:16 +0900 Subject: [PATCH] docs: Deprecate @octokit/webhooks-definitions --- packages/github/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/github/README.md b/packages/github/README.md index 30e6a68e..b758caad 100644 --- a/packages/github/README.md +++ b/packages/github/README.md @@ -59,15 +59,15 @@ const newIssue = await octokit.rest.issues.create({ ## Webhook payload typescript definitions -The npm module `@octokit/webhooks-definitions` provides type definitions for the response payloads. You can cast the payload to these types for better type information. +The npm module `@octokit/webhooks-types` provides type definitions for the response payloads. You can cast the payload to these types for better type information. -First, install the npm module `npm install @octokit/webhooks-definitions` +First, install the npm module `npm install @octokit/webhooks-types` Then, assert the type based on the eventName ```ts import * as core from '@actions/core' import * as github from '@actions/github' -import {PushEvent} from '@octokit/webhooks-definitions/schema' +import {PushEvent} from '@octokit/webhooks-types' if (github.context.eventName === 'push') { const pushPayload = github.context.payload as PushEvent