add github hook dispatcher
fix function declaration
add more error handling
Merge pull request #119 from reviewninja/feature/webhook-dispatcher

add github hook dispatcher