Added support for repository server hook and improved tests

this method does not need to be exposed.