Developer-first workflow automation

Integrating GitHub and Slack With a Bit of Python

“Purrr” is a real-life example of using AutoKitteh to improve our collaboration and velocity. It’s short for “Pull Request Review Reminder,” and it integrates GitHub and Slack efficiently to streamline code reviews and reduce the turnaround time to merge pull requests.
We’ve all been there:
  1. You send a small PR for review
  2. And wait
  3. And wait…
  4. You ping the reviewers, who had no idea about your PR
  5. They post some comments, but you notice them only a day later
  6. You start a DM chat with each reviewer to discuss their comments quickly, and remind them to review the PR again
  7. They ask for context, given that you’re all juggling multiple PRs at the same time
  8. You start a group chat to share DM messages between the reviewers
  9. Finally, you get all the approvals, but again, you notice them only a day later
You’ve probably also tried GitHub’s Slack integration, only to discover that it spams you about everything that happens in the GitHub repo, drowning all the time-sensitive details that are relevant to you in the noise of everyone else’s activity.
Surely, there has to be a better way, right? Yes!
As soon as you create a PR, Purrr automatically creates a dedicated Slack channel for it. This channel’s name reflects the PR number and title. It also shows the PR description, all the links, stats, participants, etc.
In Slack, it looks like this:
Whenever someone submits or edits line/file comments and PR reviews in GitHub or updates the git branch’s head, Purrr immediately syncs them as message threads in Slack:
The same thing applies to the other direction: when someone writes or edits message threads in Slack, Purrr immediately syncs them as comment threads in GitHub.
Purrr provides even more real-time, informative, 2-way updates:
  • Add/remove reviewers and assignees in GitHub → Purrr adds/removes them in Slack 
  • Stakeholders join/leave the Slack channel → Purrr adds/removes them in GitHub
  • PR title and description changes
  • GitHub action check states
Under the hood, Purrr seamlessly translates back and forth between GitHub and Slack: user identities, markdown text formatting, emoji reactions, etc.
Finally, when the PR is merged (or closed, or marked as a draft), Purrr automatically archives the Slack channel. Cleanliness is next to godliness, after all.
Additional bonus features for the win:
  • A single look in Slack shows you all the PRs you’re involved in, and which ones have updates!
  • You can now search GitHub PR and comment history in Slack!
  • When you type #123 in Slack, it can autocomplete the PR’s channel name—which is informative in itself and also provides one-click context and history!
At this point, you might be thinking, “That sounds cool, but I bet it took years to develop and mature, and it takes a lot of infrastructure to run this service and store its data, plus message queues with advanced configurations to manage event spikes and prevent loss, not to mention reliability engineers to maintain five nines of availability, right?”
Ain’t nobody got time for that!
AutoKitteh handles the reliability needs, system complexity, API configuration, and connection states. It conveniently plugs into your personal or organizational infrastructure of choice for deployment and monitoring. No hassle, no churn, no hidden requirements.

Last but not least, would you believe that Purrr’s entire codebase is just a few hundred lines of Python?

This is because AutoKitteh drastically simplifies calls to external APIs. For example:

And that’s why it’s 100% open-source software! There are no monthly limits, paid subscriptions, or per-seat fees! It’s free, usable out-of-the-box, and customizable!

To use it:

  1. Install AutoKitteh server
  2. Download the Purrr repo
  3. Configure connections and deploy – see documentation.

Join now

Imagine building versatile automation by simply writing a few lines of code, without the drudgery of repetitive, boilerplate infrastructure tasks. Fast, flexible and reliable automation, letiing you focus solely on the business logic.