💎 PR to Ticket
Platforms supported: GitHub, GitLab, Bitbucket
Overview¶
The create_ticket
tool automatically generates tickets in ticket tracking systems (Jira
, Linear
, or GitHub Issues
) based on PR content.
It analyzes the PR's data (code changes, commit messages, and description) to create well-structured tickets that capture the essence of the development work, helping teams maintain traceability between code changes and project management systems.
When a ticket is created, it appears in the PR description under an Auto-created Ticket
section, complete with a link to the generated ticket.
Pre-requisites
- To use this tool you need to integrate your ticketing system with Qodo-merge, follow the Ticket Compliance Documentation.
- For Jira Cloud users, please re-integrate your connection through the qodo merge integration page to enable the
update
permission required for ticket creation - You need to configure the project key in ticket corresponding to the repository where the PR is created. This is done by adding the
default_project_key
.
Usage¶
there are 3 ways to use the create_ticket
tool:
Automatic Ticket Creation¶
The tool can be configured to automatically create tickets when a PR is opened or updated and the PR does not already have a ticket associated with it. This ensures that every code change is documented in the ticketing system without manual intervention.
To configure automatic ticket creation, add the following to .pr_agent.toml
:
Interactive Triggering via Compliance Tool¶
Supported only in Github and Gitlab
The tool can be triggered interactively through a checkbox in the compliance tool. This allows users to create tickets as part of their PR Compliance Review workflow.
- After clicking the checkbox, the tool will create a ticket and will add/update the
PR Description
with a section calledAuto-created Ticket
with the link to the created ticket. - Then you can click
update
in theTicket compliance
section in theCompliance
tool
Manual Ticket Creation¶
Users can manually trigger the ticket creation process from the PR interface.
To trigger ticket creation manually, the user can call this tool from the PR comment:
After triggering, the tool will create a ticket and will add/update the PR Description
with a section called Auto-created Ticket
with the link to the created ticket.
Configuration¶
Configuration Options¶
Configuration
default_project_key | The default project key for your ticketing system (e.g., SCRUM ). This is required unless fallback_to_git_provider_issues is set to true . |
default_base_url | If your organization have integrated to multiple ticketing systems, you can set the default base URL for the ticketing system. This will be used to create tickets in the default system. Example: https://YOUR-ORG.atlassian.net . |
fallback_to_git_provider_issues | If set to true , the tool will create issues in the Git provider's issue tracker (GitHub) if the default_project_key is not configured in the repository configuration. Default is false . |
Helping Your Organization Meet SOC-2 Requirements¶
The create_ticket
tool helps your organization satisfy SOC-2 compliance. By automatically creating tickets from PRs and establishing bidirectional links between them, it ensures every code change is traceable to its corresponding business requirement or task.