Connecting Pull Requests and Issues
When using ZenHub, you can attach Pull Requests to their corresponding Issue so that you can track both of these together as they move throughout the pipelines on your board.
Make sure you download the ZenHub Extension for Chrome or Firefox
In order to connect Pull Requests with your existing Issues you must have the ZenHub extension installed on either Chrome or Firefox. You can download this here.
Connecting an Issue to an existing Pull Request: To get started, navigate to the Pull requests tab in GitHub and select to view your Pull Request. Whether the Pull Request is open or merged you'll be able to connect an Issue to it:
Note: When you are connecting a Pull Request with an Issue then both the Pull Request and the Issue will go to the pipeline where the Pull Request is located. The logic behind this is that the piece of work is now one - both the Pull Request and Issue together
Connecting an Issue when creating a Pull request: On the Pull Request creation page you'll notice two options below the green Create pull request button.
1. The first is a default pipeline option. Here, you will be able to choose a default pipeline for your Pull Request to automatically land in on your board. This will then be the default pipeline for all new Pull Requests going forward.
2. The second is a Connect with an issue option. Here, you will be able to connect your Pull Request with any of your existing issues that live in your ZenHub Workspace, including those that are cross-repo. This will automatically place both the Pull Request and the connected Issue in the default pipeline that you specified:
Merging Pull Requests and Closing Issues
- When you merge a PR in GitHub, we do not automatically close the issue it is connected with. The PR will remain connected with the Issue and they will both remain in the same pipeline. However, the PR icon will be updated to reflect its new merged state:
- ZenHub supports the GitHub functionality of closing Issues using keywords. Using closing keywords in your Pull Requests enables you to automatically close the referenced Issue. You can read more on GitHubs closing keywords here. When using these keywords to close Issues, please do be aware that this will not automatically connect the PR with the Issue.
- When you close an Issue that is connected to a Pull request, the Pull Request will not automatically merge. The PR will disconnect from the Issue and remain in the same pipeline The Issue will be moved to the 'closed' pipeline:
- You can connect multiple Pull Requests to an Issue.
- You can only connect one Issue to a Pull Request.