git-codeowners
A git subcommand to query and validate CODEOWNERS.
List owners of files based on the CODEOWNERS file of the current repository.
> git
> git
)
)
# Oops, did the last commit add unowned files?
> git |
)
# I need stats about my repo
> echo
Installation
-
via pip:
pip install git-codeowners
-
via Cargo:
cargo install git-owners
Note: The Cargo crate installs an equivalent
git-owners
command in addition togit-codeowners
, for backwards compatibility.
Usage
-
Show owner of a file
-
Show owners for a list of files
Each path should be relative to the git repository root. This makes it easy to combine with other git commands:
-
Show owners for every tracked file in the repository
|
-
Show owners for files modified in last five commits
|
-
Congratulate the user if the current changeset does not add files without owner
| &&
-
Get an overview of your CODEOWNERS coverage
Features
- Detects the right CODEOWNERS file of the current git repository (
CODEOWNERS
,docs/CODEOWNERS
, or.github/CODEOWNERS
) - Works well as a pre-commit hook. Returns a non-zero exit code if unowned files are found
- Is composable & scripting friendly
- Is fast & written in Rust
Issues & Contributing
If you have any questions or problems, feel free to communicate using Github Issues.