Reviewing your changes since a particular review on github - github

I pushed a PR.
A reviewer asked for changes.
I make changes and push again.
I would like to be able to see only my new changes since his review on github to make sure I did what I was supposed to do.
Atm I can't because I haven't reviewed it yet (option disabled). Only the reviewer can click on it:
Is there a way to view it?

You should be able to see individual commits from "Commits" tab.

One way to do it is finding out the commit when the review took place and then compare it to your commit by manually editing the url and adding 2 dots between commit ids, like this
https://github.com/user/repo/compare/c3a414e..faf7c6f
source: https://help.github.com/articles/comparing-commits-across-time/#comparing-commits

Related

Github Pull Request Procedure for adding more changes during a PR

If I submit a pull request to Github with some changes..
And then someone edits those changes..
And I approve those changes to my PR..
And then want to make one more change to the same file..
If I go to edit the file (on the patch branch), I can see the proposed changes I have made, but not the ones I approved from the suggestions the other person made..
This makes it very confusing to know what is going to happen when the PR is accepted (if I add more changes), will the other User's changes get lost? are they added as separate patches? I'm not sure how to test this out other than setting up another github account and trying to recreate the scenario, but maybe someone can answer before I try that.

Pull Request outdated label

I have a PR where I left several comments in my review on GitHub
A colleague has updated the code to apply my suggested changes, and now all my review comments appear with the outdated label.
However I still see the code in the state it was when I commented it.
What I want is an easy way to see the new code he has written, not the old. Is it possible at all?
Open the PR and Click on the files changed tab. All the latest changes that have been pushed to the branch requesting the PR will be available.

How to view changes in GitHub after comments

Is there a way to view changes that were made after a code review by other developers?
Say, someone suggested a change and commented in GitHub on a specific file.
PR creator made changes to that specific file and checked in. - Is there a way to view that change?
Clicking view changes doesn't take me directly to the file that has comments. It takes me to all the files
This feature was very useful in BitBucket, as I could see all the changes of that specific file and comments in one place. Seems it's missing in GitHub.
This did not help:
https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request
The "Reviewing proposed changes in a pull request" you mention (as not helping) should still include a Jump to link:
That should allow you to narrow the list of files, and select the one you want to go to immediately.

Change author of Pull Request in GitHub / Create PR in someone's stead

tl;dr I created a PR in someone's stead. Now I can't submit a review. Is there a way around?
The other developer messed up and merged a feature to the target branch, so I reverted their changes, fixed the issues, squashed and rebased their work while still keeping their authorship on the commit and I created a new pull request. Now, when I want to submit a review, it prevents me to Request changes, because now I am the author of the PR. How can I change it so that the other developer is responsible and receives the review?
You cannot change the author of a pull request or create one in somebody else's name. GitHub doesn't allow this because it would permit people to forge pull requests and let another person receive negative feedback. For example, if I opened a PR in your name containing something wildly inappropriate (say, a racist slur), you'd be blamed for it unfairly. Moreover, in some regulated environments, keeping an accurate record of who contributed code is very important for legal reasons, which is another reason why this isn't permitted.
In most cases, if a commit gets reverted, then just have the original author open a new PR. Clearly they'd wanted to submit the code in the first place. You can even create the branch for them with their commit squashed and prepared, as long as they open the PR. This is a case where a helpful conversation with another contributor goes a long way, and presumably you'd want to let them know in a kind way that they made a mistake and that you reverted it anyway. Since there's no way to create a repository on behalf of another user, you should close your PR and ask them original submitter to open it instead.
I think it's obvious why you can't approve your own PRs. I can see that this is a situation where requesting changes might be useful, but I suppose the rationale is that you wouldn't have opened the PR if you thought it needed improvements, and if you later learned that, you certainly would revise it instead of merging it.
Although bk2204's answer is correct and explains why there isn't a one-button solution, it doesn't address the actual question of:
How can I change it so that the other developer is responsible and receives the review?
The only way to that is to close out the PR you opened and have them open it instead.

Reviewing only changes I did not review before

I'm reviewing a huge GitHub pull request. I've reviewed the originally pushed code and made a lot of comments. Now I'm supposed to review the changes that were committed according to my comments but going through all the changed files is just inhumane. Is there a way to look through only the changes that I haven't reviewed yet?
Open the pull request and select the review tab (Files changed). On the left side of this tab there is a drop down "Changes from all commits". Change it to "Show changes since your last review".