Skip to content

Commit

Permalink
[2022-09-07] Add section about linking existing pull requests and bra…
Browse files Browse the repository at this point in the history
…nches to an issue from the issue sidebar (github#30305)
  • Loading branch information
imjohnbo authored Sep 6, 2022
1 parent f07866d commit f4e3a8d
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/help/issues/development-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Linking a pull request to an issue
intro: You can link a pull request to an issue to show that a fix is in progress and to automatically close the issue when the pull request is merged.
intro: You can link a pull request {% ifversion link-existing-branches-to-issue %}or branch {% endif %}to an issue to show that a fix is in progress and to automatically close the issue when the pull request {% ifversion link-existing-branches-to-issue %}or branch {% endif %} is merged.
redirect_from:
- /github/managing-your-work-on-github/managing-your-work-with-issues-and-pull-requests/linking-a-pull-request-to-an-issue
- /articles/closing-issues-via-commit-message
Expand Down Expand Up @@ -60,9 +60,9 @@ Only manually linked pull requests can be manually unlinked. To unlink an issue

You can also use closing keywords in a commit message. The issue will be closed when you merge the commit into the default branch, but the pull request that contains the commit will not be listed as a linked pull request.

## Manually linking a pull request to an issue
## Manually linking a pull request to an issue using the pull request sidebar

Anyone with write permissions to a repository can manually link a pull request to an issue.
Anyone with write permissions to a repository can manually link a pull request to an issue from the pull request sidebar.

You can manually link up to ten issues to each pull request. The issue and pull request must be in the same repository.

Expand All @@ -78,6 +78,28 @@ You can manually link up to ten issues to each pull request. The issue and pull
5. Click the issue you want to link to the pull request.
![Drop down to link issue](/assets/images/help/pull_requests/link-issue-drop-down.png)

{% ifversion link-existing-branches-to-issue %}

## Manually linking a pull request or branch to an issue using the issue sidebar

Anyone with write permissions to a repository can manually link a pull request or branch to an issue from the issue sidebar.

You can manually link up to ten issues to each pull request. The issue can be in a different repository than the linked pull request or branch. Your last selected repository will be remembered

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-issues %}
3. In the list of issues, click the issue that you'd like to link a pull request or branch to.
4. In the right sidebar, click **Development**.
![Development menu in the right sidebar](/assets/images/help/issues/development-menu.png)
5. Click the repository containing the pull request or branch you want to link to the issue.
![Drop down to select repository](/assets/images/help/issues/development-menu-select-repository.png)
6. Click the pull request or branch you want to link to the issue.
![Drop down to link pull request or branch](/assets/images/help/issues/development-menu-select-pr-or-branch.png)
7. Click **Apply**.
![Apply](/assets/images/help/issues/development-menu-apply.png)

{% endif %}

## Further reading

- "[Autolinked references and URLs](/articles/autolinked-references-and-urls/#issues-and-pull-requests)"
* "[Autolinked references and URLs](/articles/autolinked-references-and-urls/#issues-and-pull-requests)"
7 changes: 7 additions & 0 deletions data/features/link-existing-branches-to-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Reference: #7945
# Documentation for linking existing branches to issue
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.7'
ghae: 'issue-7945'

0 comments on commit f4e3a8d

Please sign in to comment.