Skip to content

triarius/git-codeowners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-codeowners

Parses GitHub CODEOWNERS1 files.

Installation

cargo install --git https://github/triarius/git-codeowners.git

To invoke this as git codeowners instead of /path/to/git-codeowners, ensure that

  1. git is installed and in your PATH
  2. The location cargo installs executables to is in your PATH. This is typically ~/.local/share/cargo/bin.

Usage

Change directory to a git repo with a CODEOWNERS file.

Usage: git-codeowners [OPTIONS] <COMMAND>

Commands:
  of         Find owners for the specified paths. Reads paths from STDIN if not provided as positional arguments
  inventory  Print all files owned by the specified owner
  help       Print this message or the help of the given subcommand(s)

Options:
  -p, --path <PATH>  Path to the CODEOWNERS file [default: .github/CODEOWNERS]
  -h, --help         Print help
  -V, --version      Print version

Detecting CODEOWNERS of all files changed in a branch

git diff (git merge-base origin/main HEAD) --name-only | git codeowners of

Footnotes

  1. See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

About

Parses and matches against github CODEOWNERS files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors