Support Gitlab Webhooks to Publish Books
This PR changes the structure of the hook processor service to allow for multiple adapters. In addition to the existing Github parsing of webhook requests, it will add support for Gitlab webhooks, which are slightly different.
The docs publisher could only accept webhook push events from Github.
The docs publisher accepts webhook push events from Github and Gitlab.
- Tests pass
- I updated the tests to use Sean's test book repo which cuts down time on tests a lot!
- I removed some try / catch blocks in the controller. I think exceptions should just be thrown instead of returning a misleading 200 status with an error message.
- It would be nice to test this with a book hosted on Gitlab. The closest I could get was to get real webhook body from the test book repo and using this in the tests.