Reimplement github compatible hooks