If I have a project structured like this:
project
│ README.md
│ config.json
package.json
│
└───folder1
│ │ fileA.js
│ │ fileB.html
│
└───folder2
│ fileC.js
│ fileD.html
How can I add a rule to the CODEOWNERS file that gives a user ownership of only the files in the root folder, but not the files in any of the subdirectories?
I've tried the following but none of them seem to work the way I want:
# CODEOWNERS
/ @johnSmith
./ @johnSmith
/* @johnSmith
After some experimenting this seems to work:
#CODEOWNERS
/*.* @userName
/apps @differentUserName
That will give @userName ownership of root files. It also applies to files inside dot-prefix folders, like .github/ or .vscode/ but no other nested directories
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With