Added support for repository server hook and improved tests

can you remove this blank line?