jrjohnson
jrjohnson_
jrjohnson-ucsf
greet me
to that app in SlackIf you're scared to deploy on Fridays, you should be scared to deploy ever.
— Jessica Mauerhan (@JessicaMauerhan) July 27, 2018
Don't you have tests? Backups? Roll back? Come on.
Tag Code
release the frontend
and Zorg would answer back with questions
Don't call us, we'll call you
Subscribe to the event types you need
Governed by OAuth permission scopes
Bot users served here
Everything is eventual
{ "token": "XXYYZZ", "team_id": "TXXXXXXXX", "api_app_id": "AXXXXXXXXX", "event": { "type": "name_of_event", "event_ts": "1234567890.123456", "user": "UXXXXXXX1", ... }, "type": "event_callback", "authed_users": [ "UXXXXXXX1", "UXXXXXXX2" ], "event_id": "Ev08MFMKH6", "event_time": 1234567890}
{ "channel":"C061EG9SL", "text":"I hope the tour went well, Mr. Wonka.", "attachments":[ { "text":"Who wins the lifetime supply of chocolate?", "fallback":"You could be telling the computer exactly what it can do with a lifetime supply of chocolate.", "color":"#3AA3E3", "attachment_type":"default", "callback_id":"select_simple_1234", "actions":[ { "name":"winners_list", "text":"Who should win?", "type":"select", "data_source":"users" } ] } ]}
const Botkit = require('botkit');const hal = new Botkit();hal.hears('Open the pod bay doors', async (bot, message) => { await bot.reply(message, "I'm Sorry Dave, I'm afraid I can't do that.");});
const Botkit = require('botkit');const Skynet = require('skynet');const controller = new Botkit();controller.hears(async (bot, message) => { const reply = Skynet.process(message.text); await bot.reply(message, reply);});
module.exports = bot => { bot.hears(['start release', 'release'], ['direct_message', 'direct_mention', 'mention'], startRelease); bot.on('interactive_message_callback', chooseReleaseType); bot.on('interactive_message_callback', confirmRelease); bot.on('interactive_message_callback', doRelease);};
const startRelease = async (bot, message) => { bot.reply(message, createActionReply(':cool: I just need to know:', releaseProject, [ { name: 'project', text: 'Which Project?', type: 'select', options: [ { text: 'Ilios Frontend', value: 'frontend', }, { text: 'Ember Simple Charts', value: 'simple-charts', }, ] }, ]));};
const releaseAndTag = async (owner, repo, releaseType, namer) => { const { nextVersion, currentVersion } = await incrementPackageVersion(dir, releaseType); await commitAndTag(dir, version, releaseName); const release = await Github.repos.createRelease({ owner, repo, tag_name: version, name: releaseName, body: releaseNotes, draft: false, prerelease: false, }); return { version, releaseName, releaseUrl: release.data.html_url };};
await bot.startConversationInChannel(SLACK_CHANNEL_ID);await bot.say('The Server is On Fire!!! :fire:');await bot.say('Everybody Blame Jon');await bot.say("PS: don't tell Jon!");
🙈
if (validUsers.includes(user)) { try { return await releaseAndTag(owner, repo, releaseType, namer); } catch (e) { bot.reply(message, `Error: ${e.message} (stack trace in logs)`); console.error(e);}
$ npm start> zorgbort@1.0.0 start> node zorgbort.jsInitializing Botkit v0.7.4info: ** Using simple storage. Saving data to .data/db/info: ** Starting webserver on port 3000info: ** Serving webhook endpoints for Slash commands and outgoing webhooks at: http://0.0.0.0:3000/slack/receiveinfo: ** Serving login URL: http://0.0.0.0:8899/logininfo: ** Serving oauth return endpoint: http://0.0.0.0:3000/oauth
$ npm start> zorgbort@1.0.0 start> node zorgbort.jsInitializing Botkit v0.7.4info: ** Using simple storage. Saving data to .data/db/info: ** Starting webserver on port 3000info: ** Serving webhook endpoints for Slash commands and outgoing webhooks at: http://0.0.0.0:3000/slack/receiveinfo: ** Serving login URL: http://0.0.0.0:8899/logininfo: ** Serving oauth return endpoint: http://0.0.0.0:3000/oauth
$ npm install -g localtunnel
$ lt --port 3000 -s zorgbort-stageyour url is: https://zorgbort-stage.localtunnel.me
jrjohnson
jrjohnson_
jrjohnson-ucsf
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |