Note: GitHub's Pull Request Linking System is separate from ZenHub's
GitHub's linking system in the sidebar of Issues and Pull Requests is separate from ZenHub's Issue PR connection. The content below is related to ZenHub's Issue PR connection feature and not GitHub's. You can learn more on GitHub's linking feature here
Within ZenHub it is possible to set up connections between Issues and PR's so that the status of work is accurately updated and reflected within your Workspace. 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 the ZenHub extension here.
Issue and PR Connection Rules
- You can connect a single PR to multiple Issues or you can connect multiple PR's to a single Issue.
- There cannot be a crossover in the Issues and PRs that are connected.
- Issues and PR's can only be in one pipeline at a time. The crossover in connection types is not allowed as this could lead to unexpected Issue/ PR movements on the Board.
- Example: As seen in the image below, you can connect PR #9 to Issue #1 with multiple PR's attached. However, you cannot connect PR #9 to Issues #5 as this is connected to PR #4 which is already connected to other Issues.
Connecting a Single PR to Multiple Issues
1. Connecting an existing PR to Issues: To get started, select to view a Pull Request. Whether the Pull Request is open or merged you'll be able to connect one or multiple Issues to the PR:
Note: An issue will be invalid and therefore unable to be selected from the dropdown list if there is a potential for crossover in connection types. ( Refer to connection rules above.)
When viewing a PR with multiple Issues connected, you will see a list of the different Issues connected. You have the option to remove these Issues from your Pull Request if required:
2. Connecting Issues when creating a PR: 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 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:
Using GitHub Keywords to Automatically Connect Issues and Pull Requests in ZenHub
For all new PRs you create, GitHub keywords (fixes, closes, resolves) will automatically link the PR and Issue in the ZenHub Board. As Issues move through the Board, the linked PR will travel with it. When the PR is closed, the Issue will close as well - plus they’ll remain linked in the Closed pipeline for future reference.
Viewing a Single Pull Request Connected to Multiple Issues on the Board
When a single PR is connected to multiple Issues, we will show each Issue as a card on the Board. The single PR will be duplicated and will show as a nested PR card on each Issue. When an Issue with a nested PR card is moved to a different pipeline, the other connected Issues will also automatically be moved to that same pipeline:
Behavior When Merging Pull Requests and Closing Issues Using ZenHub's Issue <> Pull Request Connection
- When you merge or close a PR in GitHub, we do not automatically close the open Issue(s) it is connected with. The merged PR will remain connected with the open Issue(s) and they will both remain in the same pipeline. The repo name for the merged/ closed PR will have a line through it and the PR icon will change to purple ( for merged) or red ( for closed):
- ZenHub supports the GitHub functionality of closing Issues using keywords. Using closing keywords in your Pull Requests allows you to automatically close the referenced Issue. You can read more on GitHubs closing keywords here.
- When you close an Issue that is connected to an open 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:
PR Reviewers and Review Status
When viewing PR cards on the Board, you will see the PR reviewers and the review status for the PR. Each reviewer will have a colored dot next to their avatar to help you quickly understand the PR status:
- Red - requested changes
- Green - approved changes
- Grey - left review comments
- Yellow - pending review