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.funcWebhookTypes() []string {
// ...
}
// EventForType returns an empty struct matching the specified GitHub event type.funcEventForType(messageTypestring) any {
}The second method would extract a lot of Event.ParsePayloadhttps://github.com/google/go-github/blob/master/github/event.go#L30, so it wouldn't be much additional code.
It looks like
go-githubhas 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:The second method would extract a lot of
Event.ParsePayloadhttps://github.com/google/go-github/blob/master/github/event.go#L30, so it wouldn't be much additional code.