The daily worklist is a small script designed for Hubot to work with Slack.
You can test your Daily Worklist by doing the following, however some plugins will not behave as expected unless the environment variables they rely upon have been set.
You can test it by telling your bot:
@botname: show my prs
Two environment variables need to be set. This can be done in your .bashrc or bash_profile. Same for using any type of deployment system i.e. Heroku.
GITHUB_TOKEN = your_github_token;
HUBOT_SLACK_TOKEN= xoxb-your_hubot_slack_token;
You will also need to set your GitHub organization orgName
at the top of the file
orgName = "Your GitHub organization";
The worklist is set by default to run on a daily schedule using cron to send payloads out at 9am
. This can be changed by editing the cronJob.
new cronJob('0 0 9 * * 1-5', sendUserPrs, null, true, 'America/Chicago');
You can find out how to get your GITHUB_TOKEN here and you can use your Hubot Slack Token recieved from Slack as an evn variable.
Additionally this script has effectively highjacked the premade Skype variable for the Slack profile.
This is imperative for using the script properly. Simply go into your Slack profile and select Edit Profile
and add your GitHub username to that field.
- Use
$ npm install --save node-cron
to install node-cron - Get Lodash by using
$ npm i -g npm
npm i --save lodash
- Install request
$ npm install request
You can review external-scripts.json
to see what is included by default.
After setting up your variables and packages be sure to place the prPayload.js into your scripts
folder for Hubot