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
The "hub" project can do this:
https://github.com/defunkt/hub
In the repository and branch that you want to send a pull request from:
$ hub pull-request -i 4
This uses the GitHub API, and attaches a pull request for the current branch to the existing issue number 4.
EDIT: Comment by @atomicules: To expand on the answer by @MichaelMior a full example is:
$ hub pull-request -i 4 -b USERNAME_OF_UPSTREAM_OWNER:UPSTREAM_BRANCH -h YOUR_USERNAME:YOUR_BRANCH URL_TO_ISSUE