write tests for addRepository handler and git hook