gboddin / php-github-cli
GitHub PHP CLI客户端
0.2.11
2018-05-03 12:08 UTC
Requires
- knplabs/github-api: ^2.5
- php-http/guzzle6-adapter: ^1.1
- symfony/console: ~2|~3
Requires (Dev)
- clue/phar-composer: ^1.0
- squizlabs/php_codesniffer: ^3.0
README
构建状态
简介
此工具旨在由人类和自动化工具在PHP项目中使用。
安装
composer install gboddin/php-github-cli
配置
工具使用GitHub令牌进行身份验证。它们可以通过以下三种方式设置
- 使用GITHUB_API_TOKEN环境变量
- 全局配置文件(~/.gitconfig)
- 本地配置文件(./.git/config)
git配置文件应如下所示
[github] token=xxxxxxxxx
用法
ghcli pr:comment octocat Hello-World 1 "Hello" ghcli status:set octocat Hello-World 33375d5f193cfa8d0fe2998ec312c871639257bf -s success -c my/context -t http://www.google.com -d "You have created/updated a commit status my friend" ghcli deploy:create octocat Hello-World -r 33375d5f193cfa8d0fe2998ec312c871639257bf -e Staging -d "Super deploy" ghcli deploy:list octocat Hello-World ghcli deploy:update octocat Hello-World 23079543 -s error -d "Failed it !" ghcli branch:create octocat Hello-World -t depedency/2.3.78 -s master ghcli ref:create octocat HelloWorld -r refs/heads/depedency/2.3.78 -s bdb276f3227a19e826d8d511cfd53639153e0a6a ghcli file:update octocat HelloWorld build.properties.lock 'Updated to version 2.3.78' 'depedency.version = 2.3.78' 'depedency/2.3.78' -c ghcli pr:create octocat HelloWorld -t "Minor upgrade 2.3.78" -s depedency/2.3.78 -b master -d "Minor upgrade depedency/2.3.78" ghcli branch:protect octocat HelloWorld master -T qa-support -t qa-support
当前模块
ghcli version 0.2.8
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
branch
branch:create Create a branch from another branch
branch:protect Protect a branch
deploy
deploy:create Creates a deployment
deploy:list List deployments for a repo
deploy:update Creates a deployment status
file
file:update Updates a file
pr
pr:comment Comment a pull request
pr:create Create a pull request
ref
ref:create Create a branch from another ref
status
status:set Creates/updates a commit status