mirror of https://github.com/zulip/zulip.git
webhooks/github: Provide more detailed info for unexpected events.
Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
This commit is contained in:
parent
88367a129c
commit
ab03659095
|
@ -569,7 +569,8 @@ def get_event(request: HttpRequest, payload: Dict[str, Any], branches: Optional[
|
||||||
elif event in IGNORED_EVENTS:
|
elif event in IGNORED_EVENTS:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
raise UnexpectedWebhookEventType('GitHub', event)
|
complete_event = "{}:{}".format(event, payload.get("action", "???")) # nocoverage
|
||||||
|
raise UnexpectedWebhookEventType('GitHub', complete_event)
|
||||||
|
|
||||||
def get_body_function_based_on_type(type: str) -> Any:
|
def get_body_function_based_on_type(type: str) -> Any:
|
||||||
return EVENT_FUNCTION_MAPPER.get(type)
|
return EVENT_FUNCTION_MAPPER.get(type)
|
||||||
|
|
Loading…
Reference in New Issue