Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Find all the Troubleshooting/Frequently Asked Questions(FAQ's) and more about hubot under this section.

Hubot Decoded

This section is to help users who want to explore hubot from a developer's point of view. The hubot we are talking about is provided by Github. We have customized it to work with individual tools using coffeescript, node packages and REST API. Sounds fancy? Let us explore more about the structure that is followed by each hubot created and customized by us:

Each bot will have the following folders/files in it. Click on each link to know more about its purpose:

 bin

This folder contains system files (shell scripts/batch file) which is used to run hubot. When we start/restart the hubot, we basically execute this shell/batch file residing in this folder, so it is the main entrypoint of every hubot.

It is recommended that you do not tamper with this file to avoid errors in hubot execution

 node_modules
Hubot is a node based software, hence needs node packages to run. As the name suggests, this folder will contain all those packages to aid the hubot. You might wonder why there is a predefined node_modules folder in the bot, we could have just mentioned all dependencies in a package.json file and run npm install command each time we installed the bot. The reason we have an explicit folder pre-filled with packages is that some node packages (viz. hubot-elasticsearch-logger, githubot etc.) are customized by us to work exclusively with our hubots.
 scripts

This folder contains all the coffeescripts and js files through which hubot will listen and execute your commands. The coffeescripts inside this folder can be edited through the IDE page provided in our OnBots application. Any new coffeescript that you will create from IDE will get stored in this folder only. For more details on how you can add/edit a coffeescript, visit the OnBots guide for IDE

 external-scripts.json

This json file will contain an array of node package names which you want to be loaded to memory every time the hubot starts. Usually, the bots provided in the OnBots botstore will contain "hubot-elasticsearch-logger" in this file by default.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.