You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{PullRequestOpenedEvent}from'@octokit/webhooks-types';import*asgithubfrom'@actions/github';github.context.payload={}asPullRequestOpenedEvent;/* TS2322: Type 'PullRequestOpenedEvent' is not assignable to type 'WebhookPayload'. Types of property 'pull_request' are incompatible. Type 'PullRequest & { state: "open"; closed_at: null; merged_at: null; active_lock_reason: null; merged_by: null; }' is not assignable to type '{ [key: string]: any; number: number; html_url?: string | undefined; body?: string | undefined; } | undefined'. Type 'PullRequest & { state: "open"; closed_at: null; merged_at: null; active_lock_reason: null; merged_by: null; }' is not assignable to type '{ [key: string]: any; number: number; html_url?: string | undefined; body?: string | undefined; }'. Types of property 'body' are incompatible. Type 'string | null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'string | undefined'.*/
Expected behavior
Typing should be compatible with @octokit/webhooks-definitions
The text was updated successfully, but these errors were encountered:
Describe the bug
The body property of the WebhookPayload interface should be
string | null
, not an optional string.toolkit/packages/github/src/interfaces.ts
Line 22 in bb6c500
To Reproduce
Expected behavior
Typing should be compatible with
@octokit/webhooks-definitions
The text was updated successfully, but these errors were encountered: