How to add CODEOWNER for all the files in a repository

36 Views Asked by At

I have a repo where I've to enforce reviews from a specific team. I want to ensure that any changes in the existing files or adding new files be reviewed by someone from that team. I saw various examples where we can restrict it based on a specific directory path or a specific file path.

e.g.

/*    <team handle>      // the team is the owner of all files in the root directory
/*/*  <team handle>      // all files in any directory at the root level, but not the subdirectories

But I couldn't find a simple way to use a team for all files in CODEOWNERS file.

Can someone guide me on that?

Thanks!

1

There are 1 best solutions below

0
avp On

Found the answer. The correct way to apply code ownership for all files in the repo is

./**            <team handle>

HTH!