The PRalarm

I have been working on stuff without posting about it this entire time. My latest finished product is the PRalarm, short for Pull Request alarm. It is an Arduino-driven USB device that lights up when somebody pushes a pull request that needs review.

We recently transitioned to this source control pattern at my work, so I decided this device would help me stay on top of reviews better than yet another e-mail alert.

The Arduino is a Teensy LC with a simple “rawhid” program that accepts messages from the PC host. When the device gets any kind of message, it does a three-second lightshow. On the PC side, I just use a cron job that uses the “hub” command-line github client to check the latest PR number and compare it to a hidden file, ~/.pr. If the PR from hub is newer than what’s in the hidden file, or if the hidden file does not exist yet, the script calls a C program that sends one message to the device and then terminates. The script then records this latest PR number back into ~/.pr.

Here is a picture of the device, which is inspired by the git logo. I’ll work on getting a video recorded of the lights in action.

Leave a Reply

Your email address will not be published. Required fields are marked *