 #   Can also notify about builds, just enable the webhook notification on travis http://about.travis-ci.org/docs/user/build-configuration/ -> 'Webhook notification'
 #
 # Dependencies:
-#   "gitio": "1.0.1"
 #
 # Configuration:
 #   None

    try
      payload = JSON.parse req.body.payload

      gitio payload.compare_url, (err, data) ->
        robot.send user, "#{payload.status_message.toUpperCase()} build (#{payload.build_url}) on #{payload.repository.name}:#{payload.branch} by #{payload.author_name} with commit (#{if err then payload.compare_url else data})"

    catch error
      console.log "travis hook error: #{error}. Payload: #{req.body.payload}"



url = require('url')
querystring = require('querystring')

module.exports = (robot) ->
  
