Skip to content

Commit d28847d

Browse files
authored
Merge pull request github#20443 from github/repo-sync
repo sync
2 parents f20ed81 + 1ec71eb commit d28847d

File tree

6 files changed

+33
-4
lines changed

6 files changed

+33
-4
lines changed
162 KB
Loading
173 KB
Loading
107 KB
Loading
36.5 KB
Loading

content/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Linking a pull request to an issue
3-
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.
3+
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.
44
redirect_from:
55
- /github/managing-your-work-on-github/managing-your-work-with-issues-and-pull-requests/linking-a-pull-request-to-an-issue
66
- /articles/closing-issues-via-commit-message
@@ -60,9 +60,9 @@ Only manually linked pull requests can be manually unlinked. To unlink an issue
6060

6161
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.
6262

63-
## Manually linking a pull request to an issue
63+
## Manually linking a pull request to an issue using the pull request sidebar
6464

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

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

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

81+
{% ifversion link-existing-branches-to-issue %}
82+
83+
## Manually linking a pull request or branch to an issue using the issue sidebar
84+
85+
Anyone with write permissions to a repository can manually link a pull request or branch to an issue from the issue sidebar.
86+
87+
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
88+
89+
{% data reusables.repositories.navigate-to-repo %}
90+
{% data reusables.repositories.sidebar-issues %}
91+
3. In the list of issues, click the issue that you'd like to link a pull request or branch to.
92+
4. In the right sidebar, click **Development**.
93+
![Development menu in the right sidebar](/assets/images/help/issues/development-menu.png)
94+
5. Click the repository containing the pull request or branch you want to link to the issue.
95+
![Drop down to select repository](/assets/images/help/issues/development-menu-select-repository.png)
96+
6. Click the pull request or branch you want to link to the issue.
97+
![Drop down to link pull request or branch](/assets/images/help/issues/development-menu-select-pr-or-branch.png)
98+
7. Click **Apply**.
99+
![Apply](/assets/images/help/issues/development-menu-apply.png)
100+
101+
{% endif %}
102+
81103
## Further reading
82104

83-
- "[Autolinked references and URLs](/articles/autolinked-references-and-urls/#issues-and-pull-requests)"
105+
* "[Autolinked references and URLs](/articles/autolinked-references-and-urls/#issues-and-pull-requests)"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reference: #7945
2+
# Documentation for linking existing branches to issue
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>=3.7'
7+
ghae: 'issue-7945'

0 commit comments

Comments
 (0)