{"action":"created","issue":{"url":"https://api.github.com/repos/github/hubot/issues/1134","repository_url":"https://api.github.com/repos/github/hubot","labels_url":"https://api.github.com/repos/github/hubot/issues/1134/labels{/name}","comments_url":"https://api.github.com/repos/github/hubot/issues/1134/comments","events_url":"https://api.github.com/repos/github/hubot/issues/1134/events","html_url":"https://github.com/github/hubot/pull/1134","id":134757670,"number":1134,"title":"Hubot, a Chatbot in ~Three~ Four Parts.","user":{"login":"ajacksified","id":175515,"avatar_url":"https://avatars.githubusercontent.com/u/175515?v=3","gravatar_id":"","url":"https://api.github.com/users/ajacksified","html_url":"https://github.com/ajacksified","followers_url":"https://api.github.com/users/ajacksified/followers","following_url":"https://api.github.com/users/ajacksified/following{/other_user}","gists_url":"https://api.github.com/users/ajacksified/gists{/gist_id}","starred_url":"https://api.github.com/users/ajacksified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajacksified/subscriptions","organizations_url":"https://api.github.com/users/ajacksified/orgs","repos_url":"https://api.github.com/users/ajacksified/repos","events_url":"https://api.github.com/users/ajacksified/events{/privacy}","received_events_url":"https://api.github.com/users/ajacksified/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-19T02:57:09Z","updated_at":"2016-02-22T21:38:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/github/hubot/pulls/1134","html_url":"https://github.com/github/hubot/pull/1134","diff_url":"https://github.com/github/hubot/pull/1134.diff","patch_url":"https://github.com/github/hubot/pull/1134.patch"},"body":"Refactor `robot` into four files:\r\n\r\n* A very basic robot class which manages the running of middleware, the event emitter, and other core functionality;\r\n* One class subclasses the base robot class and provides autoloading scripts, \"help\" documentation, and auto-starting an express server;\r\n* express.coffee, which contains functionality to create the web server\r\n* scopedHTTPClient.coffee, which contains functionality for `robot.http`\r\n\r\n**There should be no user-facing changes to how hubot works**. bin/hubot works as normal; http servers, aliases, etc use the same defaults as before. (It does expose a `setupRouter` function, but that functionality already existed by overwriting `@router` anyways.)\r\n\r\nThe purpose of this is so that one can use the \"basebot\" for all of hubot's functionality, without having to also require autoloading of files. For example, one may want to precompile hubot + scripts into a single, dead-code-eliminated javascript file for lower memory usage and startup time (which is my particular usecase- precompile the coffeescript.) Or, maybe you want a client-side hubot loaded because you're a mad genius doing crazy things. _many possibilities._\r\n\r\nWe could also call basebot \"batteries\" or something clever.\r\n\r\n\r\n<3 hubot is the best"},"comment":{"url":"https://api.github.com/repos/github/hubot/issues/comments/187397670","html_url":"https://github.com/github/hubot/pull/1134#issuecomment-187397670","issue_url":"https://api.github.com/repos/github/hubot/issues/1134","id":187397670,"user":{"login":"michaelansel","id":85195,"avatar_url":"https://avatars.githubusercontent.com/u/85195?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelansel","html_url":"https://github.com/michaelansel","followers_url":"https://api.github.com/users/michaelansel/followers","following_url":"https://api.github.com/users/michaelansel/following{/other_user}","gists_url":"https://api.github.com/users/michaelansel/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelansel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelansel/subscriptions","organizations_url":"https://api.github.com/users/michaelansel/orgs","repos_url":"https://api.github.com/users/michaelansel/repos","events_url":"https://api.github.com/users/michaelansel/events{/privacy}","received_events_url":"https://api.github.com/users/michaelansel/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T21:38:31Z","updated_at":"2016-02-22T21:38:31Z","body":"I too am intrigued :smiley: Gotta find time to do an in depth review (probably tomorrow), but my initial thoughts as we embark on making an awesome-but-massive change:\r\n- how much cleanup do we want to roll into this refactor? (e.g. I see you improving the constructor signature)\r\n- should Robot be the official shim layer for Hubot v2 and Basebot be API v3?\r\n- for all new interfaces, I would love to formalize and test the snot out of them. Similarly, I'd like to explicitly call out what is *not* part of the interface so we can make future changes without guessing.\r\n- @ajacksified, when we put together middleware (#724, #801, #803), it took...a bit of time. Hopefully we can move a little faster this time around, but I just want to set expectations appropriately :-)\r\n\r\nI **really** like the idea of using this as an opportunity to provide v3 awesomeness without breaking all existing v2 bots. Double interfaces obviously isn't something we want to support forever, but lines up well with our previous thoughts around releasing all the new functionality of v3 and then deprecating v2 (can't find the comment, but I think you'll recall the conversation, @technicalpickles)."}}