0

I have a private repository hosted on github.com. Of late, some of my colleagues are doing their check-in without testing things well. I would like to set up and code review process so that all the check-ins go through me. I review the code changes and then it gets merged with the master branch.

Is there already a process for this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Hemant Bhargava
  • 3,251
  • 4
  • 24
  • 45

1 Answers1

0

You can set up branch protection rules to say what must happen before a commit is pushed to a certain branch. If in GitHub you go to settings and then branches you can then set rules for a specific branch. For example, for the master branch, you might require a pull request with a certain number of reviewers. This means a pull request from another branch must be created and another team member must review the code before the branch can be merged to master. You can also specify in the rule who can push directly to that specific branch. If you have tests that are running in Jenkins or on some other platforms you can also require status checks (i.e. your tests) to pass before the branch can be merged.

These rules and others can be added to any branch to help you with your problem.

Joshua Zeltser
  • 488
  • 2
  • 9