-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
The current HandleEventRequest
is scoped to events being received from an http request.
githubevents/githubevents/events.go
Line 286 in 8b91160
func (g *EventHandler) HandleEventRequest(req *http.Request) error { |
Would it be possible to add the following function:
// HandleEvent executes registered handlers.
func (g *EventHandler) HandleEvent(deliveryID string, eventName string, event interface{}) error {
switch event := event.(type) {
case *github.BranchProtectionRuleEvent:
return g.BranchProtectionRuleEvent(deliveryID, eventName, event)
case *github.CheckRunEvent:
...
}
This would allow easy extension of the library when events are pushed into a queue and retrieved from something else than an http request.
Metadata
Metadata
Assignees
Labels
No labels