Opening an issue from code
You can open a new issue from a specific line or lines of code in a file or pull request.
When you open an issue from code, the issue contains a snippet showing the line or range of code you chose. You can only open an issue in the same repository where the code is stored.
Any GitHub user can create an issue in a public repository where issues have not been disabled.
On GitHub, navigate to the main page of the repository.
Locate the code you want to reference in an issue:
- To open an issue about code in a file, navigate to the file.
- To open an issue about code in a pull request, navigate to the pull request and click Files changed. Then, browse to the file that contains the code you want include in your comment, and click View.
Choose whether to select a single line or a range:
- To select a single line of code, click the line number to highlight the line.
- To select a range of code, click the number of the first line in the range to highlight the line of code. Then, hover over the last line of the code range, press Shift, and click the line number to highlight the range.
To the left of the code range, click . In the drop-down menu, click Open new issue.
Type a title and description for your issue.
If you're a project maintainer, you can assign the issue to someone, add it to a project board, associate it with a milestone, or apply a label.
When you're finished, click Submit new issue.