简体   繁体   中英

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?

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.

When you are the main moderator of your project you can choose the merge of pull request made by others as PR's contain the code they have written you can merge or reject it

But when it comes to your case you can add a mention ('@' ) to other developers other than maintainer for a code review, so they can suggest some changes and hopefully your PR gets merged someday这里

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM