Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

git - What is the recommended way to review pull requests on GitHub?

Let's say that a contributor on a project submits a pull request and I need to compile the code in order to make sure that it fixes the issue. In this scenario, I usually copy the changes that the author made into my local repo, run everything and make sure it works, merge the PR, and run git pull to update my local repo.

But I just discovered that PR's result in a new branch. So I guess it would be better to run git pull and git checkout <branch> locally, run the code and make sure it fixes the issue, then merge the PR and delete the branch.

What about the scenario in which a (non-contributor) forks a repo, makes changes to the main branch of his forked repo, sets the upstream to the original repo, and submits a PR? Does this result in a new branch on the original repo that I can checkout locally in order to test out the proposed changes?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What about the scenario in which a (non-contributor) forks a repo, makes changes to the main branch of his forked repo, sets the upstream to the original repo, and submits a PR?

Then you just reject that and tell that user to follow proper procedure: make a branch and submit the branch as the PR. Don’t let some forker push you around.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...