hubot
hubot copied to clipboard
Reconsider yeoman as the generator
yeoman is actually pretty heavy weight for someone getting started. It has a ton of dependencies, so there's a lot more chances for things to go wrong at install time.
Some recent issues:
- https://github.com/github/generator-hubot/issues/53
- https://github.com/github/generator-hubot/issues/51
- https://github.com/github/generator-hubot/issues/56
Some ideas:
- go back to rolling our own
- web based generator for creating a hubot?
My two favorites as a web version, or just forking a good example repo.
I personally like the idea of a web based generator, though it seems like it could be a bit of an effort to maintain and setup. However, the idea of selecting an adapter, possibly a deployment destination and a few starter scripts seems like a fairly straight forward process that would be easy to get started with. This actually seems to be a little bit like http://chato.ps 's setup process, I think.
For many projects, I really like the idea of a starting point repo that can just be forked / cloned. I forget how exactly I setup my hubot a while ago, but I think I basically started off with a clone of a similar group's hubot setup. For Heroku related stuff, the "Deploy to Heroku" button works pretty well. HipChat has an example bot setup like this (https://github.com/hipchat/triatomic).
Found this ticket after looking around to see if there was a known issue with the yeoman generator.
We've had several people drop by in our support channel with the issue described here: https://github.com/RocketChat/hubot-rocketchat/issues/114
We're thinking about changing our instructions and removing the suggestion for using yeoman. Instead putting up a repo with our adapter setup, so they can just clone it.
Granted doing so, we're going to have to include a few more FAQ's to handle Bot renaming, etc.
I'd love to see a web based generator. If it could be done to just spit out a single JSON file, you could probably put on the hubot site and the generate the JSON file client side. Prevent the need to stand up infrastructure.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Another idea tossed around has been a create
repo, ie as described in https://yarnpkg.com/lang/en/docs/cli/create/
@geekgonecrazy - Did you ever end up creating a repo?
Using yeoman on Amazon linux is just a complete nightmare.
There are a lot of threads complaining about the same issue (running as root, permissions, sudo, etc) -- found 6-7 of them, all like this one: https://github.com/yeoman/yeoman.github.io/issues/282
It's really frustrating when you just want to get started with hubot.
@ventz I believe our bot team has as yeoman gave us a lot of headache.
https://github.com/RocketChat/hubot-rocketchat-boilerplate
@geekgonecrazy - Thanks!
I think we should not use or recommend yeoman to generate a new "bot" because it's added complication with not enough value, imho.
I currently believe that the problem statement is "I want to run a chat bot and after some research, I've decided on leveraging Hubot. And so I want to create a new git repo of scripts that I can package, deploy and run as an instance of Hubot somewhere."
Given that, I propose the following recipe.
mkdir myhubot
cd myhubot
npm init -y
npm i coffeescript hubot
At this point, they theoretically could start Hubot with:
npx hubot -a slack
or
npx hubot
which will run the shell adapter by default.
But there are no scripts yet and they haven't configured a Slack App, nor setup a way for the adapter to get the required credentials from the environment. So there's still some work for them to do before they're really up and running.
I think we should start with updating the docs with the above recipe and start including recipes for more complicated scenarios, in an incremental fashion. An example of that would be:
Development Setup
Execute the following commands to create the initial codebase.
mkdir myhubot
cd myhubot
npm init -y
npm i coffeescript hubot
npx hubot
Executing npx hubot
will use the builtin Shell adapter by default, but since there are no scripts
yet, Hubot won't know any commands. To add your first command, execute the following:
mkdir scripts
touch scripts/Test.js
Edit the new Test.js
file and type the following ....
I can update the Getting Started page to include some recipes for development.
I think there is value in having a quickstart for using Hubot. There are lots of examples out there of tooling to simplify getting started, like Rails' new app generator, create-react-app, and others.
The generator was originally builtin hubot itself, but it has been awhile so I don't recall why we moved to yeoman. IIRC, it was gaining popularity as a generator.
A repository template would be a pretty lo-fi way to have a quick start, and not have any moving parts to worry about?
I currently believe that the problem statement is "I want to run a chat bot and after some research, I've decided on leveraging Hubot. And so I want to create a new git repo of scripts that I can package, deploy and run as an instance of Hubot somewhere."
That is the exact train of thought that led me here :slightly_smiling_face:
Given that, I propose the following recipe.
mkdir myhubot cd myhubot npm init -y npm i coffeescript hubot
Seconded
RE: repository template, how 'bout both? A repo template and the changes proposed in #1644 ?
@technicalpickles I don't have permissions to create repos for this org. Do you want to create the repo template?
I merged the PR to remove yeoman. Let me know if ya'll want to discuss further and we can re-open this issue.