I use a tool https://reviewable.io/ which adds this functionality (and some other stuff) on top of GitHub PRs and it's invaluable.
+1 for reviewable. In addition to this feature reviewable's diff display is a lot nicer. For example it does a much better job handling whitespace only changes when a block of code gets reindented but otherwise doesn't change.
Oh yeah, collapsing whitespace-only changes is excellent. But even better is how it can detect and collapse changes introduced by rebasing the PR.
You can hide whitespace-only changes in GitHub by appending ?w=1 to the end of the url too.
But that makes the whitespace changes literally invisible. Reviewable strikes a good balance, where it will show you whitespace changes that appear in diff hunk contexts, and also explicitly call out when it's skipping a chunk of whitespace-only changes, and you can click on that callout to ask it to show you those whitespace changes anyway.
Reviewable doesn't hide whitespace changes, it shows just enough so you can tell that whitespace changed without getting in the way of reading the rest of the diff.
Re:Go Proposal: Accept GitHub PRs
by closeparen on Thursday January 05, 2017 @05:47PM
(#13332177)
You should try Phabricator. Diffs work this way.
Changesets take the typical GitHub workflow where the author force pushes to the PR to address comments and creates another "version" of that PR, with a new set of inline comments, but sharing the overarching PR comments. You can compare and contrast any set of "PR versions" in order to determine the changes applied by the author.
I desperately wish GitHub PRs worked this way.