maenbn / gitlab-ci-build-status
检查GitLab CI最新提交构建的简单工具
dev-master
2016-04-04 14:02 UTC
Requires
Requires (Dev)
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2024-09-28 19:03:51 UTC
README
检查GitLab CI最新提交构建的简单工具
安装
该工具需要您安装PHP 5.4.* + 和 Composer。
要获取gitlab-ci-build-status的最新版本,请将以下行添加到您的 composer.json
文件中
"maenbn/gitlab-ci-build-status": "dev-master"
然后运行 composer install
或 composer update
来安装。
用法
设置客户端需要您的Gitlab CI URL、Gitlab CI项目ID和Gitlab CI项目令牌
$client = new \Maenbn\GitlabCiBuildStatus\Client('https://gitlab.example.com/api/v3' 'project_id', 'my_private_token');
然后您可以获取状态。您还可以指定一个分支(默认为master)。
$status = $client->getStatus('my_current_patch');