You can open a new issue by selecting lines of code from an existing file within a repository or pull request. Issues that are opened from code contain a URL that points to the specified code range.

Any GitHub user can create an issue in a public repository where issues have not been disabled.

  1. On GitHub, navigate to the main page of the repository.

  2. Navigate to the file or pull request that contains the code you want to open an issue about.

  3. If you're referencing code within a pull request, click Files changed, then browse to the file that contains the code you'd like to include your issue. Click View. View the whole file button
  4. Hover over the first line of the code range you want and click the line number to highlight the code line. Highlight beginning code line

  5. Hover over the last line of the code range, press Shift, and click the line number to highlight the code range. Highlight ending code line

  6. To the left of the code range, click ... and select Open new issue. Open new issue from drop-down menu

  7. Type a title and description for your issue. A sample issue

  8. 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.

  9. When you're finished, click Submit new issue.

Further reading