 _ = require 'underscore'
+crypto = require 'crypto'
 
 request = require 'request'
 async = require 'async'

    }, requestCb


postreceive = (req, res, next) ->
  # ping event
  if req.headers['x-github-event'] == 'ping'
    console.log 'ping event received.'
    console.log req.body.zen
    res.status(204).end()
    return

  repo = req.body.repository.full_name
  q = { access_token: process.env.GITHUB_ACCESS_TOKEN }

  async.eachSeries audits, createAuditIssue, (err) ->
    if (err)
      console.log err
      res.status(500).end()
    else
      res.end()

