承接 timoschinkel/codeowners-cli 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

timoschinkel/codeowners-cli

最新稳定版本:1.6.0

Composer 安装命令:

composer create-project timoschinkel/codeowners-cli

包简介

A cli interface for the codeowners library

README 文档

README

Code owners CLI is a CLI interface to simplify common operations on Code owners files using timoschinkel/codeowners.

Installation

Use Composer for installation:

composer require timoschinkel/codeowners-cli

If you don't want Code owners CLI to be part of your project to can opt to install it globally:

composer global require timoschinkel/codeowners-cli

Usage

When installed as dependency of your project:

./vendor/bin/codeowners [options] <command>

When installed globally:

codeowners [options] <command>

NB When installed globally you will need to install Composer itself globally add the global Composer binary folder to your PATH variable, eg by adding the following line to ~/.bash_profile or ~/.bashrc:

export PATH=~/.composer/vendor/bin:$PATH

All commands have the options supplied by Symfony Console:

  • -q, --quiet; Do no output any message
  • -v|vv|vvv, --verbose; Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

When no CODEOWNERS file is specified - using -c or --codeowners - the application will search the CODEOWNERS file in the following locations based on the working directory:

  • <working_dir>/.github/CODEOWNERS
  • <working_dir>/.bitbucket/CODEOWNERS
  • <working_dir>/.gitlab/CODEOWNERS
  • <working_dir>/CODEOWNERS
  • <working_dir>/docs/CODEOWNERS

Calling the command with the verbose option will print what file is used when applicable.

Available commands

owner

Shows the owner of the path(s) passed as parameter.

Usage:
  owner [options] [--] <paths>...

Arguments:
  paths                        Paths to files or directories to show code owner, separate with spaces

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to <working_dir>/CODEOWNERS
  -o, --owner-only             Suppress normal output, only output the owner when applicable

For example:

codeowners owner ./src

list-files

Shows all files for an owner:

Usage:
  list-files [options] [--] <owner> <paths>...

Arguments:
  owner                        Codeowner for which the files should be listed
  paths                        Paths to files or directories to show code owner, separate with spaces

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to <working_dir>/CODEOWNERS

For example:

codeowners list-files @team ./src

The output of this command can be used to feed into other tools using xargs:

codeowners list-files @team ./src | xargs <command>

list-unowned-files

Shows all files that don't have an owner specified:

Usage:
  list-unowned-files [options] [--] <paths>...

Arguments:
  paths                        Paths to files or directories to show code owner, separate with spaces

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to <working_dir>/CODEOWNERS
      --strict                 Return a non-zero exit code when there are unowned files

For example:

codeowners list-unowned-files ./src

list-owners

Shows all available owners inside the found CODEOWNERS file.

Usage:
  list-owners [options]

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to <working_dir>/CODEOWNERS

For example:

codeowners list-owners

统计信息

  • 总下载量: 3.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-01-06