i'm developing a web server in python that get payloads from a github webhook for specific events (push, new commits, pull requset...) how can i distenguise between thoese events throw gson? i've looked in the payload but fond nothing..:/ but in the other hand - i have a code that creates a handler for push event :
@webhook.hook() # Defines a handler for the 'push' event def on_push(data): print("Got push with: {0}".format(data))
so is there a built in "event detector" in the webhook library? found nothing online
EDIT : found this :"The type of activity is specified in the action property of the payload object. " BUT there is no keyword action in the payload i got and the type of event i triggered in github is a commit but all i got in payload says : 'modified': ['README.md'] 'message': 'Update README.md nothing straight forward