NOTE: This has been deprecated for slack-pairs which combines both.
This application is intended to be a self-hosted version of Donut.
This application uses Ruby 3.0. I recommend installing either rvm or rbenv and using a gemset (if you have either of those installed, .ruby-gemset
should autocreate this).
- Follow instructions and create a new slack app
- Add the following scopes to your slack app:
users:read
,mpim:write
,im:write
,chat:write
,channels:join
,channels:manage
,groups:write
,groups:read
,mpim:read
,im:read
, andchannels:read
. - Create a new app in Heroku or your hosting service of choice. Go to wherever you can add environment variables.
- Set
MIN_GROUP_SIZE
to 3. - Get your oauth token for your newly created slack app (must be installed first). Store this as
SLACK_OAUTH_TOKEN
. - Open up the channel you want to use the app in in your browser and get the channel ID. It should start with a "C". Store this as
GROUP_CHANNEL
. - If you are setting this up, send error messages to yourself by setting
USER_ID_FOR_ERROR
to your Slack user id. - Update
SlackMessage
to use whatever channel name you are adding it to. - Currently, the job will only run on Mondays on even weeks. Update this if you want to change it.
- Deploy app to Heroku (or your hosting service of choice).
- If using Heroku, install Heroku Scheduler.
- Schedule
rake create_groups
to run every day at a time of your choice. If you have a hosting service that will allow you to run cron jobs, you can remove the code mentioned above that checks that day and week and just use cron format. If using Heroku, just run daily and it will quit if it's not the right day 🙂 - PROFIT!
NOTE: To run locally, set those environment variables in your local .env
file in project's root directory as well. .env
will be ignored by git.
There is currently one test that you can run by running rspec
. To lint this project, run bundle exec standardrb --fix
.