SpongeBot is a very simple ChatBot designed to be trigged via a Slack slash-command, executed on webtask.io, and hosted as a private Gist.
Designed to be easily extensible, and very very loosely based on Hubot.
Before using SpongeBot, you will need a Slack account and a Webtask account.
You will also need to have installed and initialised the webtask.io command line interface.
For some functionality, you will also need a github account and
api access token. For full build functionality to work,
you will need to grant it gist
priviledges.
For the build, you will need Node and npm.
A local clone of this repository.
Full instructions on setting all of that up is beyond the scope of this read me (aka - you're on your own).
The simplest installation is the one I will discuss.
- install node packages
- set an environment variable for your github token
- run the full deployment
- run the curl command output
- copy-and-paste the url from the curl command into the url field for your slash command on Slack
All in all, that'll look something like:
> npm install
> export $GITHUB_API_TOKEN=<your api token here>
> gulp deploy:full
> <the curl command it said to try>
Once you have set up the Slack command, type "/spongebot help" for instructions (assuming you have set you slash command up to be called "spongebot" (and why wouldn't you?)).
Example commands:
/spongebot hello
/spongebot insult me
/spongebot show everyone some-org some-repo issue 123
You can modify commands in init.js
For some functionality (github issues) you need to
pass extra data in the token that webtask generates.
To do so, create a file call token-data.json
in your project root, and set it up like this
(properties will be sent through as secret/ectx
data):
{
"github_api_token" : "<your api token>",
"github_organisation" : "<your github organisation, or user>"
}