6

Most Github repositories I'm aware of use the following workflow for pull requests: one or several users with "contributor" privilege review the suggested changes and then one of them merges the pull request which most of the time requires just two clicks - "merge" and then "confirm merge". Here's an example in CoreFX repo - one of contributors merged the changes.

However there's OpenCV repository with pull requests like this where one of the contributors reviews the changes and then approves them by posting a "thumbs up!" comment which causes a dedicated user opencv-pushbot to merge the changes. It looks like no contributor ever merges the changes himself in that repository - they are all merged by the "push bot" user.

What's the use of that? It takes the same amount of labor to post a "thumbs up" comment as it takes to merge the pull request. It also makes it a bit harder to track who approved which merge because now all changes are merged by the same user.

What advantages does the "push bot" approach have?

6

The push bot also interfaces with a continuous integration server, which you can see if you click on the "View Details" next to its merges. That means there are two conditions for a merge: the thumbs up and a passed set of automated tests. Having the bot do the merge means the maintainer doesn't have to wait for the tests to finish, worry about accidentally merging a pull request with failing tests that he will have to back out later, or have to manually check the test results each time. He just focuses on reviewing the code.

On a well-functioning team with a good set of tests, knowing who approved a particular merge does not usually matter that much.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.