A JIRA integration for LLM-assisted technical refinements

In agile development teams it is not uncommon to spend a lot of time writing user stories and technical specifications. A popular tool in the industry is JIRA, so I’ve decided to create a little demo to showcase how teams can use PR Pilot to save time by handing over some of that work to an AI agent.

The Scenario

Let’s say you have a new JIRA ticket for a feature request. The request is described by a non-technical colleague using their own words, so as a next step you would need a technical colleague to add the necessary technical information so that the ticket can become part of the backlog. This usually involves:

  • Reading and understanding the feature request

  • Looking at the relevant code to understand the technical context

  • Define functional and non-functional requirements

  • Write additional technical context to define the scope of the ticket

This takes valuable time and brain power away from highly skilled (and usually expensive) technical colleagues.

The Automation

PR Pilot gives you an easy way to let LLMs do the heavy lifting and accomplish these tasks with very little effort. You can find the demo code on Github. Here’s how it works step by step:

  1. Set up a JIRA webhook to get notified when a label needs-refinement is added to a ticket

  2. Define a prompt instructing PR Pilot on how to do the technical refinement

  3. Start your webservice to let PR Pilot handle the JIRA webhook requests

In the webservice, you’ll only need a few lines of code:

# Ask PR Pilot to do technical refinement for the ticket
task = create_task(GITHUB_REPO, PROMPT.format(issue_description=issue_description))
technical_refinement = wait_for_result(task)

# Add the technical context as a comment to the issue
jira = JIRA(JIRA_API_ENDPOINT, basic_auth=(JIRA_API_USER, JIRA_API_TOKEN))
jira.add_comment(issue_key, technical_refinement)

Now, whenever you add the needs-refinement label to a JIRA ticket, PR Pilot will do a technical refinement. Based on your natural language instructions, it will:

  • Find relevant code based on the ticket description

  • Read and understand the code in the context of your ticket

  • Define (non)-functional requirements, acceptance critieria, or whatever you asked it to

  • Add the information as a comment on your JIRA ticket

Tweak it!

The use case above can easily be changed and customized to fit your own use case, for example:

  • Enrich the technical refinement by integrating the webhook with your project documentation/wiki

  • Add Slack notifications

  • Have PR Pilot look at multiple code repositories

  • … and so much more!

Adjust the prompt / code to fit your teams specific needs and save time, money and brain power by letting AI assist you in your daily workflows.

Previous
Previous

Minimize context switching: A natural language interface between Slack and Github to stay in the flow

Next
Next

Using AI Agents in Github Actions to Automate your Github Flow