jeffmccune/puppet-webhooks — pull request #6 by jeffmccune (2013-01-14 07:45:16+00:00)
Title: Add PuppetLabs::PullRequestController class

Without this class most of the logic regarding what to do with the pull
request data is embedded directly in the route. This is a problem because
the route block is already quite large and a dedicated controller class
seems like a more appropriate place to put these conditional behaviors and
the behaviors of each event.

Add authentication helper methods and enforce authentication

Without this patch each of the event routes is handling authentication
inline. This is a problem because each route should not need to
duplicate this code, especially as we start to handle more events.

TODO: This makes the specs fail as authentication is now enforced.

Store the Github event in the events table

This patch simply stores the Github payload and request into the events
table. All events have the same name, which is perhaps a really bad idea.