I\'m not sure, but I have a vague memory of creating a github pull request with \"Issue 4\" or something in the title, and it automatically attached itself to Issue 4 in the
Instead of doing that on the client side (with hub, as in Christian Oudard answer), you now (February 2020) can do it on the server side (github.com)
See "View and link issues and pull requests from the sidebar "
You can now link issues and pull requests via the sidebar in their respective pages. Connections made here will automatically close issues once a linked pull request is merged.
Documentation:
And there is a search API with that feature.
Find all the open issues in a repository that have closing pull requests references with the
linked:prsearch qualifier.
Similarly, locate all the pull requests in a repository that are missing a supporting issue with-linked:issue.