Automatically generate and update COEOWNERS file from git blame data.
Add this to your .pre-commit-config.yaml
- repo: https://github.com/c0m1c5an5/codeowners-pre-commit.git
rev: 1.0.0
hooks:
- id: codeowners
Automatically generate and update COEOWNERS file from git blame data.
- Provide user map file with
-m
flag, otherwise users will be refferenced as thei email. - Set treshold with
-t
flag. By default uset is considered an owner if they have created at least 25% of the lines. - If you would like to set alternative CODEOWNERS file destination use
-o
flag.
Example user map file (compatible with .gitownrc):
{
"[email protected]": "@example",
"[email protected]": "@google"
}
Feel free to create an issue, report a bug or suggest improvements in the "Issues" section.