Skip to content

Fetching Ticket Context for PRs

Supported Git Platforms : GitHub, GitLab, Bitbucket

Overview

Qodo Merge PR Agent streamlines code review workflows by seamlessly connecting with multiple ticket management systems. This integration enriches the review process by automatically surfacing relevant ticket information and context alongside code changes.

Ticket systems supported

  • GitHub
  • Jira (💎)

Ticket data fetched:

  1. Ticket Title
  2. Ticket Description
  3. Custom Fields (Acceptance criteria)
  4. Subtasks (linked tasks)
  5. Labels
  6. Attached Images/Screenshots

Affected Tools

Ticket Recognition Requirements:

  • The PR description should contain a link to the ticket or if the branch name starts with the ticket id / number.
  • For Jira tickets, you should follow the instructions in Jira Integration in order to authenticate with Jira.

Describe tool

Qodo Merge PR Agent will recognize the ticket and use the ticket content (title, description, labels) to provide additional context for the code changes. By understanding the reasoning and intent behind modifications, the LLM can offer more insightful and relevant code analysis.

Review tool

Similarly to the describe tool, the review tool will use the ticket content to provide additional context for the code changes.

In addition, this feature will evaluate how well a Pull Request (PR) adheres to its original purpose/intent as defined by the associated ticket or issue mentioned in the PR description. Each ticket will be assigned a label (Compliance/Alignment level), Indicates the degree to which the PR fulfills its original purpose, Options: Fully compliant, Partially compliant or Not compliant.

Ticket Compliance

By default, the tool will automatically validate if the PR complies with the referenced ticket. If you want to disable this feedback, add the following line to your configuration file:

[pr_reviewer]
require_ticket_analysis_review=false

Providers

Github Issues Integration

Qodo Merge PR Agent will automatically recognize Github issues mentioned in the PR description and fetch the issue content. Examples of valid GitHub issue references:

  • https://github.com/<ORG_NAME>/<REPO_NAME>/issues/<ISSUE_NUMBER>
  • #<ISSUE_NUMBER>
  • <ORG_NAME>/<REPO_NAME>#<ISSUE_NUMBER>

Since Qodo Merge PR Agent is integrated with GitHub, it doesn't require any additional configuration to fetch GitHub issues.

Jira Integration 💎

We support both Jira Cloud and Jira Server/Data Center. To integrate with Jira, you can link your PR to a ticket using either of these methods:

Method 1: Description Reference:

Include a ticket reference in your PR description using either the complete URL format https://.atlassian.net/browse/ISSUE-123 or the shortened ticket ID ISSUE-123.

Method 2: Branch Name Detection:

Name your branch with the ticket ID as a prefix (e.g., ISSUE-123-feature-description or ISSUE-123/feature-description).

Jira Base URL

For shortened ticket IDs or branch detection (method 2), you must configure the Jira base URL in your configuration file under the [jira] section:

[jira]
jira_base_url = "https://<JIRA_ORG>.atlassian.net"

Jira Cloud 💎

There are two ways to authenticate with Jira Cloud:

1) Jira App Authentication

The recommended way to authenticate with Jira Cloud is to install the Qodo Merge app in your Jira Cloud instance. This will allow Qodo Merge to access Jira data on your behalf.

Installation steps:

  1. Click here to install the Qodo Merge app in your Jira Cloud instance, click the accept button.
    Jira Cloud App Installation

  2. After installing the app, you will be redirected to the Qodo Merge registration page. and you will see a success message.
    Jira Cloud App success message

  3. Now you can use the Jira integration in Qodo Merge PR Agent.

2) Email/Token Authentication

You can create an API token from your Atlassian account:

  1. Log in to https://id.atlassian.com/manage-profile/security/api-tokens.

  2. Click Create API token.

  3. From the dialog that appears, enter a name for your new token and click Create.

  4. Click Copy to clipboard.

Jira Cloud API Token

  1. In your configuration file add the following lines:
[jira]
jira_api_token = "YOUR_API_TOKEN"
jira_api_email = "YOUR_EMAIL"

Jira Data Center/Server 💎

Local App Authentication (For Qodo Merge On-Premise Customers)
  • Go to Jira Administration > Applications > Application Links > Click on Create link

application links * Choose External application and set the direction to Incoming and then click Continue

external application * In the following screen, enter the following details: * Name: Qodo Merge * Redirect URL: Enter your Qodo Merge URL followed https://{QODO_MERGE_ENDPOINT}/register_ticket_provider * Permission: Select Read * Click Save

external application details * Copy the Client ID and Client secret and set them in your .secrets file:

client id and secret

[jira]
jira_app_secret = "..."
jira_client_id = "..."

2. Step 2: Authenticate with Jira Data Center/Server
  • Open this URL in your browser: https://{QODO_MERGE_ENDPOINT}/jira_auth
  • Click on link

jira auth success

  • You will be redirected to Jira Data Center/Server, click Allow
  • You will be redirected back to Qodo Merge PR Agent and you will see a success message.
Personal Access Token (PAT) Authentication

We also support Personal Access Token (PAT) Authentication method.

  1. Create a Personal Access Token (PAT) in your Jira account
  2. In your Configuration file/Environment variables/Secrets file, add the following lines:
[jira]
jira_base_url = "YOUR_JIRA_BASE_URL" # e.g. https://jira.example.com
jira_api_token = "YOUR_API_TOKEN"
Footer