Minimize context switching: A natural language interface between Slack and Github to stay in the flow
If you and your development team use Slack, you probably often find yourself saying things like:
“I think there’s already an open issue for that”
“Let me check the code real quick”
“Don’t we already have a class for this somewhere?”
“ We should document this…”
“OK, I’ll add that to the README”
And off you go, opening your browser and/or code editor to do this “real quick” — or hand it off to an intern ;) Taking care of small tasks like these interrupts your workflow and requires you to switch contexts on a regular basis.
With PR Pilot, you can stay in the flow by simply writing a prompt and letting AI do the work. In this post you will learn how to easily build a slash command for Slack that allows you to do that.
Talk to your Github Repo
Instead of handling these mundane tasks yourself, the /pilot command we’ve built allows you to simply describe the task to be done. Let’s look at an example:
Example: A class needs documentation
Our code has a class called TaskEngine. Let’s say in a Slack conversation with a colleague, you realize that this class is quite difficult to understand and we need better documentation for it.
Doing it yourself: ~10min + multiple tools
For you, that means:
Open the code base and find the file that implements the class
Understand what exactly needs to be documented
Open a new issue describing what needs to be documented where and why
Get back to your colleague / share the issue you’ve created
By the time you’re done, you probably already forgot how this topic even came up and what you were talking about with your colleague - who is now busy working on something else. Context switching kills productivity, so let’s fix it.
Using PR Pilot: < 1min directly in Slack
With the Slack integration we’ve built, you simply describe the task at hand in your own words:
PR Pilot gets to work and responds with a link to the dashboard so you can track what it’s doing in real time:
Finally, it sends you the result as a direct message:
That was so easy! Without ever using Slack, you got this task done:
Faster - What would have taken you at least 10min, PR Pilot did in less than 1
Cheaper - Time is money when it software development
Easier - Say what needs to be done and wait for the result, that’s it
In-App - Stay in the flow of your conversation instead of flipping through tools and code
Increased productivity is just a prompt away
The prompt used in the demo only scratches the surface of what PR Pilot can do for you:
Searching the code base
Reading / Writing files
Searching, reading and interacting with Github issues
Search the web for information
Depending on the nature of your prompt, it will use these capabilities to autonomously understand and execute the instructions.
Customize it!
This is just a simple demo with one generic /pilot command and the response is sent to you as a private message. You can easily extend or customize the code to fit your needs:
Have the bot respond to mentions of @PR Pilot
Send bot’s responses to a Slack channel for everyone in your team to see
Create more specialized slash commands, for example:
/ask - Ask a question about your code or Github issues and let PR Pilot find the answer
/create-issue - Create a new Github issue based on your prompt
/document - Have PR Pilot read code and document it according to your instructions
… and so much more!
Make your life as a developer easier
Integrating PR Pilot with Slack streamlines your collaboration by keeping you in the flow. Less context switching lets you focus on the task at hand instead of interrupting your workflow with mundane digital errands.