Note that this payload will only be fully available in case of standard push hooks (see below for more information).

gith()

The gith function returns a new Gith object that has all of the EventEmitter2
methods.

Additional gith Methods

On the gith server, there are three additional methods available:

gith.close()

This closes the gith server

gith.listen( port )

If you didn't pass in a port to .create() when you required gith, this
will start the server on the specified port

gith.payload( github-style-payload )

You can broadcast a payload to the gith server manually.

Using gith for other types of hooks

When you use Github UI to declare a web hook, it's only attached to the push event.

Whenever you want to attach you hook to other events, you will have to use the API. In this case, gith may not be able to fully interpret the original payload, and you should consider the simplified payload as unreliable. In those cases, just use payload.original.