     tfsDomain = ""
 
   tfsBuildListAPICall = "_apis/build/builds"
+  tfsBuildDefinitionsAPICall = "_apis/build/definitions"
 
   if process.env.HUBOT_TFS_DEFAULT_COLLECTION?
     tfsDefaultCollection = process.env.HUBOT_TFS_DEFAULT_COLLECTION

      missingAnything |= true
    missingAnything

  debugRegex = (aRegexArrayItem) ->
     robot.logger.debug aRegexArrayItem


  ##########################################################
  #                       COMMAND
  # hubot tfs build list SpidersFromMars
  # hubot tfs build list SpidersFromMars from MyCollection
  ##########################################################
  robot.respond /tfs build list (\S*)(?: from )?(\S*)/, (res) ->
    # Don't go further if the required environment variables are missing
    return if missingEnvironmentForTFSBuildApi(res)


        return
      else
        result = JSON.parse apiCallRes.body
        res.reply "Found #{result.count} results for #{tfsProject} in #{tfsCollection}"
        tableResult = asciiTable.buildTable(tableDefinition, result.value)
        res.reply tableResult



  ##########################################################
  #                       COMMAND
  # hubot tfs build list SpidersFromMars
  # hubot tfs build list SpidersFromMars from MyCollection
  ##########################################################
  robot.respond /tfs build list (\S*)(?: from )?(\S*)/, (res) ->
    doRespond(res, tfsBuildListAPICall, buildListTableDefinition)

  robot.respond /tfs build definitions (\S*)(?: from )?(\S*)/, (res) ->
    doRespond(res, tfsBuildDefinitionsAPICall, buildDefinitionsTableDefinition)


  robot.hear /orly/, (res) ->
