# How do I link Pull Requests to Issues

In Hivel, we map the pull requests and commits with Jira issues if the Jira issue key is mentioned in any of the following:

1. **Commit Messages and Branch Names**

* Include the Jira issue key (e.g., `PROJ-123`) in your branch names and commit messages. This is crucial for Jira to automatically link the development activity to the issue. For example, name your branch something like `feature/PROJ-123-new-feature`.

2. **Pull Requests**

* When creating pull requests, include the Jira issue key in the title and description of the pull request. For example, title your PR `"PROJ-123 Add new login feature"`.

Additionally, if you're using Jira with Bitbucket, GitHub, or GitLab, you can take advantage of the deep integration features:

* **Development Panel in Jira:** Ensure your repository is connected to Jira. When you mention an issue key in your branch name, commit message, or PR, Jira will show this in the development panel on the issue’s page.

<figure><img src="/files/3bOCW5Aq5biZ0bhqDoXa" alt="" width="563"><figcaption><p><em>Screenshot from Jira instance to show the Development panel</em></p></figcaption></figure>

* **Automation Rules:** Set up automation rules in Jira to transition issues based on actions in the linked VCS (like PR opened or merged).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivel.ai/faqs/metrics-and-data-faqs/how-do-i-link-pull-requests-to-issues.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
