To my knowledge, you can only do this if they grant you permission. In the past this was only possible by them adding you as a contributor on their fork, however, in September 2016, GitHub added a feature for exactly this use case, allowing the person requesting the Pull Request to give permission to the maintainer(s) of the upstream repository simply by marking a checkbox.
You can make a comment on the Pull Request, telling them that their are some issues you’d like to fix before merging the Pull Request, and stating that you’d like them to give you permission to commit to their Pull Request branch by checking the “Allow edits from maintainers” checkbox on the Pull Request, and giving them a link to the GitHub Help page about the feature, so they can see exactly how to enable it. Once they’ve done so, you can push to the Pull Request branch of their repository directly.
Things you can do if they haven’t/won’t give you write access to their pull request branch:
-
Make comments on their Pull Request:
- Go to the Pull Request in your browser
- Scroll to the bottom of the “Conversation” (default) page
- Post comments describing the changes they need to make before you’ll accept the PR.
-
Make comments on the code in their Pull Request:
- Go to the Pull Request in your browser
- Clicking the “Files changed” link at the top
- Hover over a line of code that should be changed
- Clicking the little blue “+” button that appears next to it
(NB: these only appear on changed, and nearby lines) - Post a comment and/or some code to fix what’s there
- Repeat 3-5 as needed.
-
Accept it as is, then fix it in your own repository
- Merge their branch as if there was nothing wrong with it
- Make a new commit to your repository that fixes the issues (preferably mentioning the PR by issue id in your commit message so that GitHub can tell it’s related and show it in the PR’s Conversation page)