go-github
go-github copied to clipboard
Add EventType consts representing the X-Github-Event header values
What: Adds type EventType string
and an EventType
const for every of the types in the maps in github/messages.go
Why: So that we can do switches like
switch eventType {
case github.EventTypeFork:
// do stuff
case github.EventTypeDiscussionComment, github.EventTypeIssueComment:
// do something with either
}
Notes:
- It should be non-breaking change
- Let me know if you want the EventType used more widely including implementing
type EventTyper interface{}
on each of those structs