GitHub has announced a new feature that makes it easier to identify which people need to review changes that have been made to code in a repository.
Using code owners, you can define specific teams or individuals that are responsible for a piece of code so that when you make a pull request the relevant people are informed automatically.
To initiate code owners within a GitHub repository, you have to create a new file called CODEOWNERS in the root directory that adheres roughly to the following format:
The principle behind code owners is, of course, nothing new — the company readily admits that it was inspired by Google’s open source Chromium web browser, which offers a feature called “owners files.”
Additionally, GitHub has also added “protected branches” to the mix, which ensure that project collaborators can’t make permanent changes to branches. It’s basically for projects with a more stringent review process, and with this feature enabled code owners for each file have to leave a review before any other collaborator can merge a pull request to that branch.
These are actually super useful features for a code-hosting platform that claims 20 million users globally and 57 million repositories. It also comes hot on the heels of a number of other updates, including the launch of Topics, which helps users find repositories based on common themes.
The company also recently announced Open Source Friday, which, as its name suggests, encourages companies to dedicate time each Friday for employees to work on open source projects.