mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	webhooks/github: Provide more detailed info for unexpected events.
Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							88367a129c
						
					
				
				
					commit
					ab03659095
				
			@@ -569,7 +569,8 @@ def get_event(request: HttpRequest, payload: Dict[str, Any], branches: Optional[
 | 
			
		||||
    elif event in IGNORED_EVENTS:
 | 
			
		||||
        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:
 | 
			
		||||
    return EVENT_FUNCTION_MAPPER.get(type)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user