-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EventType consts representing the X-Github-Event header values #3272
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @MaerF0x0!
Two minor tweaks, please, then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.
EventType() EventType | ||
} | ||
|
||
// EventType corresponds to the X-GitHub-Event: header for Webhooks events and payloads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// EventType corresponds to the X-GitHub-Event: header for Webhooks events and payloads | |
// EventType corresponds to the X-GitHub-Event: header for Webhooks events and payloads. |
type EventTyper interface { | ||
EventType() EventType | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is not used anywhere, let's please delete it.
If someone finds this useful in their own code, then it is a simple matter to create it there instead of here.
Also, please make sure all tests run locally by following step 4 of CONTRIBUTING.md and push any necessary changes to this PR. |
Also, please resolve all conflicts and push (not force-push) the changes to this PR. Thank you! |
@gmlewis Thanks for the updates. I will be able to get to this in the later half of October. Just wanted you to know I haven't forgotten about, or abandoned this :) |
What: Adds
type EventType string
and anEventType
const for every of the types in the maps ingithub/messages.go
Why: So that we can do switches like
Notes:
type EventTyper interface{}
on each of those structs