Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Approve Commits On Github

Tags:

git

github

I have a project on Github and I want to create two distinct teams of contributors.

The first team will be a push/pull self-organising team of people who can make changes at will.

The second team will be people who are new to the project and need more guidance.

I would like to be able to "approve" the changes made by the second team - i.e. peer review them and help them to better understand our standards and the direction of the project.

How do I set the permissions so they can make changes, but those changes need to be approved?

like image 418
Fenton Avatar asked Sep 14 '11 08:09

Fenton


People also ask

How do I accept a pull request?

To accept the pull request, click the Pull Requests tab to see a summary of pending pull requests. If you are happy with the changes, click Merge Pull request to accept the pull request and perform the merge. You can add in a comment if you want. Once you click Merge Pull request, you will see a button Confirm merge.

How do I review a PR on GitHub?

Under your repository name, click Pull requests. In the list of pull requests, click the pull request that you'd like to ask a specific person or a team to review. Navigate to Reviewers in the right sidebar. To request a review from a suggested person under Reviewers, next to their username, click Request.

How do I accept a pull and compare request on GitHub?

Go to your repository on GitHub and you'll see a button “Compare & pull request” and click it. Please provide necessary details on what you've done (You can reference issues using “#”). Now submit the pull request. Congratulations!

How do I Unapprove a pull request on GitHub?

On the "Conversation" tab, scroll to the review you'd like to dismiss, then click . Click , then click Dismiss review. Type your reason for dismissing the review, then click Dismiss review.


2 Answers

You can add the “trusted” developers as collaborators (Repository Administration → Collaborators); that gives them full read/write access. The rest of the developers can fork the repository and issue a pull request when they want to merge something back. You’ll do a code review in the pull request and if it’s fine, merge it.

like image 63
zoul Avatar answered Oct 05 '22 10:10

zoul


with the latest feature launched by github, now it can be done out of the box for any member in team (better to have for all rather than excluding some).

Steps:

  1. Configure Protected Branches
  2. Disable Merge Button until commit changes are approved by a peer

More Details Here ... enter image description here Edited the answer as the 1 big issue with forked repo is fixed now

like image 37
Pooja Avatar answered Oct 05 '22 09:10

Pooja