Hubot for Ingress
This is a clone of a Hubot installed on Slack. Feel free to fork/clone for your own group's usage. We run ours on a https://github.com/progrium/dokku instance.
Setup
Slack Integration
- Log into your Slack instance.
- Go to the integrations page (in the web interface, click the team name for admin things and choose integrations).
- Scrolling through the list, find Hubot. Add that one.
- Selet a username for your bot. Ours has gone through several name changes (hubot, xm-bot, groot). You must also give the robot a "full name". You can also set an avatar.
- At the end, you'll get an API token. You'll need it for later.
Things to note for later:
B. The API token
Hubot Codebase
- Clone this repo to your local machine:
git clone [email protected]:impleri/another-ingress-hubot.git
- Deploy it to your server (depends on setup)
- Configure the necessary environment variables:
- HEROKU_URL=https://[app-name].[domain-name.com]
- HUBOT_CYCLE_TZ_NAME (from hubot-ingress). America/Chicago is US/Central.
- HUBOT_SLACK_TOKEN (token from above)
- HUBOT_SLACK_INVITE_TOKEN (from hubot-invite-slack)
- HUBOT_YOUTUBE_API_KEY (from hubot-youtube)
- HUBOT_AUTH_ADMIN (from hubot-auth*)
- REDIS_URL (from hubot-redis-brain)
- Restart your robot for good measure:
heroku ps:restart
- This is a comma-separated list of user ids that get robot taming powers. To get the user ids for HUBOT_AUTH_ADMIN, go to https://api.slack.com/methods/users.list/test (you may need to generate an API token for your account) and get the list of users. Search for a user by username and get the
"id"
field about the username.
Test in Slack
- Invite your tame robot to a chat room. It should join automatically.
- Ping your robot:
[hubot-name] doge me
. It should repond with a Doge meme. - Check the cycle times are correct:
[hubot-name] cp
. This should provide the next septicycle checkpoint time localized to your timezone. If it isn't correct, ensure the timezone is correct:[hubot-name] cycle offset
. - Ensure meme generation works:
[hubot-name] need help why not zoidberg?
should generate a Zoidberg meme.