     'tfs-build rem <org>/<repo> builds with <project>/<definition id> from <collection>'
   ]
 
-
   # Initialize environment variables
   tfsServer = process.env.HUBOT_TFS_SERVER
   tfsUsername = process.env.HUBOT_TFS_USERNAME

    buildResData = req.body.resource
    robot.logger.debug buildResData

    buildReqData = robot.brain.get buildResData.id
    #robot.logger.debug buildReqData

    branch = buildReqData.ref.substring(buildReqData.ref.lastIndexOf('/')+1)
    sha = buildReqData.after.substring(0, 7)

    robot.messageRoom room, "Build ##{buildResData.id} of #{buildReqData.repository.name}/#{branch} (#{sha}) #{buildResData.status}"

    #Setting the default state to error as the list of return code for the TFS API isn't documented
    state = "error"
    if buildResData.status == "succeeded"
      state = "success"
    else if buildResData.status == "failed"
      state = "failure"

    setGitHubStatus(buildReqData.repository.statuses_url, buildReqData.after, state,  buildResData.url, "Build submitted by Hubot")
    res.send 'OK'

        setGitHubStatus(buildReqData.repository.statuses_url, buildReqData.after, "pending",  buildResData.url, "Requested TFS build ##{buildResData.id} with #{tfsCollection}/#{tfsProject}/#{tfsDefinition}")

        # Saving the repo and commit details so we can call the GitHub status API when build is finished.
        pendingBuilds[buildResData.id] = buildReqData

  ###############################################################
  # Update GitHub status
