Mike Bland


Of bots and docs

I've written a Slack bot in Node.js that files GitHub issues, and a unit testing tutorial in Node.js based on the bot.

- Alexandria
Tags: 18F, Federal government, grouplets, programming, technical, Testing Grouplet
Discuss: Discuss "Of bots and docs" on Google+

There’s much to say, but since I’ve another 18F blog post trilogy on the way (Andre Francisco’s idea, not mine, just like the last trilogy), I’ll keep this brief. In late November, my colleague Andrew Maier nudged me to write a Slack bot to automate filing GitHub issues for the 18F Handbook based on emoji reactions. A couple weeks later, I produced and launched the hubot-slack-github-issues Hubot plugin. Not only does it file issues for the 18F Handbook, it’s configurable to file issues for any emoji against any repository. It’s a pretty nifty tool, and I’d be interested to hear from others who might be interested in using it.

This bot experience produced another opportunity too good to pass up. Since starting 18F, I’d been meaning to write an automated testing tutorial in the vein of Google’s unit testing Codelabs, cultivated by the Testing Grouplet and Eng EDU. The desire intensified ever since trying to get the 18F Testing Grouplet and 18F Edu off the ground. But for a long time I was stuck for a worthy, inspiring example.

I realized the bot made a wonderful case study, for reasons I’ll enumerate in one of my upcoming 18F blog posts. However, I’ve already posted a mostly-complete draft of the Unit testing in Node.js tutorial. I still have to write the “Tools and automation” and conclusion chapters, and it still needs review and editing. That said, I’m rather pleased with the way it’s coming together. As a bonus, during the course of writing the coding chapters, I made a ton of improvements to the bot and its tests that I’m now porting back into the actual bot.

If you’re inclined to take the tutorial for a spin, I’d love any feedback you may have. If you’d like to subscribe to or participate in any of the technical review issues, please do so.