gboddin/php-github-cli

GitHub PHP CLI客户端

安装: 257

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 1

开放问题: 2

类型:项目

0.2.11 2018-05-03 12:08 UTC

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