Added support for repository server hook and improved tests

You don't need to use `fmt.Sprintf` here. Just `{"content": "some content"}` should works.