Stumbled across a great tip on Stack Overflow showing how you can get Github pull request information into your local repository.

First you need to tell git to include the pull request data in a fetch.

git config --add remote.origin.fetch +refs/pull/*/head:refs/remotes/origin/pull/*

Note that if you have a different remote name for Github you will need to change references to origin to match your remote name.

Then each time you do a git fetch the pull request information will be fetched as well. This means that if you need to find the pull request that added a particular commit you can use

git describe --all --contains abcdefgh

where abcdefgh is the SHA of the commit. Also if you do a git log --decorate it will include the pull request information in the log.