this post was submitted on 10 Nov 2023
5 points (72.7% liked)

Git

2910 readers
1 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 1 year ago
MODERATORS
 

Our team has three seniors. We have 3 juniors and more coming up.

We want to have some set of organization in our git repos. I want the three of us to be required reviewers for the team repos, but we three should be able to merge pull requests for our codes without having to get it code reviewed by the other two.

I tried setting up a codeowners file in github with our team admin group as the codeowner, but it is making me unable to merge PRs for my code without the other two reviewing it. I can add our individual handles as code owners, but that would mean I would need to update every individual repo if we get a new admin or one of us goes away.

What is the best way to achieve what I’m looking for? Please advise.

top 8 comments
sorted by: hot top controversial new old
[–] aport 11 points 1 year ago (1 children)

Why do you think seniors don't need their code reviewed?

[–] canpolat 7 points 1 year ago

This sounds more like a Github question.

[–] RandomDevOpsDude 3 points 1 year ago

I believe in GitHub branch protection rules, you can set required review by a code owner, as well as set an amount of reviews required.

You are also able to structure codeowner files and assign codeowners to certain paths within the repo that they "own", rather than all or nothing.

You are able to set bypass rules for certain individuals, and as repo admin there is a little checkbox on PRs that will appear by default to allow you to ignore the requirements, although it is generally not recommended, but I won't harp on the reasons others have already pointed out.

disclaimer: I mainly work on a GHES instance, which may be function slightly different than public GH