Skip to content

fix: define and/or use an existing type for GitHubEventAction #34

@mattxwang

Description

@mattxwang

Currently, GitHubEventAction uses an any prop for the payload:

interface GitHubEventActionProps {
type: string,
payload: any,
}

This shouldn't have to be the case, since octokit defines types for all of its request/responses, including the payload of an API hit. The reason I haven't done this yet? It's hard to find!

So, let's:

  1. find the type, and/or create a TS Union of the relevant types
  2. simplify the existing code in GitHubEventAction to use the new type, and avoid unnecessary null / ? checks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions