X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=bin%2Fgit-codeowners;h=be0025bf27d5955ca913d3293a737f00928e9ca5;hb=3c7ed3d762399efb2d01121392f7115104095788;hp=60e79b27bcd2a8d04b67ca38435c6f06fe718e68;hpb=e3541feec258bc63e2cf5ac387e264816a4bf278;p=chaz%2Fgit-codeowners diff --git a/bin/git-codeowners b/bin/git-codeowners index 60e79b2..be0025b 100755 --- a/bin/git-codeowners +++ b/bin/git-codeowners @@ -6,7 +6,9 @@ git-codeowners [--version|--help|--manual] - git-codeowners [show] [--format FORMAT] [--[no-]project] [PATH...] + git-codeowners [show] [--format FORMAT] [--owner OWNER]... + [--pattern PATTERN]... [--[no-]patterns] + [--project PROJECT]... [--[no-]projects] [PATH...] git-codeowners owners [--format FORMAT] [--pattern PATTERN] @@ -19,12 +21,35 @@ =head1 DESCRIPTION -F is yet another CLI tool for managing F files in -git repos. In particular, it can be used to quickly find out who owns -a particular file in a monorepo (or monolith). +F is yet another CLI tool for managing F files in git repos. In +particular, it can be used to quickly find out who owns a particular file in a monorepo (or +monolith). -B The interface of this tool and its modules will -probably change as I field test some things. Feedback welcome. +B The interface of this tool and its modules will probably change as I field +test some things. Feedback welcome. + +=head1 INSTALL + +There are several ways to install F to your system. + +=head2 from CPAN + +You can install F using L: + + cpanm App::Codeowners + +=head2 from GitHub + +You can also choose to download F as a self-contained executable: + + curl -OL https://raw.githubusercontent.com/chazmcgarvey/git-codeowners/solo/git-codeowners + chmod +x git-codeowners + +To hack on the code, clone the repo instead: + + git clone https://github.com/chazmcgarvey/git-codeowners.git + cd git-codeowners + make bootstrap # installs dependencies; requires cpanm =head1 OPTIONS @@ -71,18 +96,33 @@ Does not yet support Zsh... =head2 show - git-codeowners [show] [--format FORMAT] [--[no-]project] [PATH...] + git-codeowners [show] [--format FORMAT] [--owner OWNER]... + [--pattern PATTERN]... [--[no-]patterns] + [--project PROJECT]... [--[no-]projects] [PATH...] Show owners of one or more files in a repo. +If C<--owner>, C<--project>, C<--pattern> are set, only show files with matching +criteria. These can be repeated. + +Use C<--patterns> to also show the matching pattern associated with each file. + +By default the output might show associated projects if the C file +defines them. You can control this by explicitly using C<--projects> or +C<--no-projects> to always show or always hide defined projects, respectively. + =head2 owners git-codeowners owners [--format FORMAT] [--pattern PATTERN] +List all owners defined in the F file. + =head2 patterns git-codeowners patterns [--format FORMAT] [--owner OWNER] +List all patterns defined in the F file. + =head2 create git-codeowners create [REPO_DIRPATH|CODEOWNERS_FILEPATH] @@ -109,7 +149,7 @@ The C<--format> argument can be one of: * C - YAML (requires L) * C - Custom format (see below) -=head2 Custom +=head2 Format string You can specify a custom format using printf-like format sequences. These are the items that can be substituted: @@ -136,7 +176,7 @@ Available filters: * C - Colorize the replacement string (if color is ON). * C - Do not colorize replacement string. -=head2 Table +=head2 Format table Table formatting can be done by one of several different modules, each with its own features and bugs. The default module is L, but this can be overridden using the @@ -146,6 +186,11 @@ C environment variable if desired, like this: The list of available modules is at L. +=head1 CAVEATS + +=for :list +* Some commands require F (at least version 1.8.5). + =cut # FATPACK - Do not remove this line.