         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.
-        robot.brain.set buildResData.id, buildReqData
+        pendingBuilds[buildResData.id] = buildReqData
 
   ###############################################################
   # Update GitHub status

      "length" : 30
    }
  ]

  asciiTable = new AsciiTable()


    '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
