File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33Parses GitHub CODEOWNERS[ ^ 1 ] files.
44
55[ ^ 1 ] : See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
6+
7+ ## Installation
8+ ``` sh
9+ cargo install --git https://github/triarius/git-codeowners.git
10+ ```
11+
12+ To invoke this as ` git codeowners ` instead of ` /path/to/git-codeowners ` , ensure that
13+ 1 . ` git ` is installed and in your ` PATH `
14+ 2 . The location ` cargo ` installs executables to is in your ` PATH ` . This is typically ` ~/.local/share/cargo/bin ` .
15+
16+ ## Usage
17+ Change directory to a git repo with a CODEOWNERS file.
18+
19+ ```
20+ Usage: git-codeowners [OPTIONS] <COMMAND>
21+
22+ Commands:
23+ find Find owners for the specified paths. Reads paths from STDIN if not provided as positional arguments
24+ help Print this message or the help of the given subcommand(s)
25+
26+ Options:
27+ -p, --path <PATH> Path to the CODEOWNERS file [default: .github/CODEOWNERS]
28+ -h, --help Print help
29+ -V, --version Print version
30+ ```
31+
32+ ### Detecting CODEOWNERS of all files changed in a branch
33+ ``` sh
34+ git diff (git merge-base origin/main HEAD) --name-only | git codeowners find
35+ ```
You can’t perform that action at this time.
0 commit comments