-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
It looks like go-github has an internal list of all the GitHub event types . I'd like to be able to iterate over the list in my own code where I route events based on event type. I'm thinking of exposing the following methods:
// WebhookTypes returns a list of all the known GitHub event type strings supported by go-github.
func WebhookTypes() []string {
// ...
}
// EventForType returns an empty struct matching the specified GitHub event type.
func EventForType(messageType string) any {
}The second method would extract a lot of Event.ParsePayload https://github.com/google/go-github/blob/master/github/event.go#L30, so it wouldn't be much additional code.
Metadata
Metadata
Assignees
Labels
No labels