You should test pull requests locally before you merge them with your code. Fetching a pull request from a remote repository is simple, just do:

  1. In your local project folder, do: git ls-remote
    You'll get a list like this:
    From https://github.com/soderlind/myproject.git
    15438eca8b7f62f371985823fe6fa8c60d7a3b50 HEAD
    15438eca8b7f62f371985823fe6fa8c60d7a3b50 refs/heads/master
    4abd4e393cc1bc57af576a67a1a56b3dae6ecabd refs/pull/2/head
    e05af83eeebb01e52d8b42f24c570c8290e0b351 refs/pull/4/head
  2. Find the pull request in the list above, and fetch it, eg:
    git fetch origin refs/pull/4/head
  3. Temporarly checkout the pull request: git checkout FETCH_HEAD
  4. Test the code
  5. Return to the master: git checkout master
  6. If everything is fine, you can now merge the pull request in the remote repository and pull it down to your local project: git pull