DEV Community

Cover image for Code owners and review in GitHub
Vesin Dusko
Vesin Dusko

Posted on

2

Code owners and review in GitHub

Code review is one of the standards for good code quality and knowledge sharing inside teams. During my carrier, I have seen a lot of different setups, and some of them are better than others.

We are using GithHub PRs as a moment for quality control. It allows us to establish rules when a code from a working branch can be merged with the development branch.

One of the basic rules is code review. All PRs have this type of protection. At least one member of the architect team should give its approval and at least two other developers.

The other gate is that at least one of the code owners of changed files should also do a code review. The concept of code owners is not a well-known functionality of GitHub, but we found it very powerful and valuable.

Details about this functionality you can find on GitHub and examples you can see at todo example.

Example
No alt text provided for this image
The good thing about code owners is that any file or folder in the code can have different owners or GitHub groups, and by it, you can make sure that the right people have done code reviews.

Also, in the case of the larger PRs, the reviewer can adjust the filter to see only files you are responsible for, speeding up the review process.
Filter

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay