PHP code example of seretos / gitlab-client

1. Go to this page and download the library: Download seretos/gitlab-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

seretos / gitlab-client example snippets


wget https://github.com/Seretos/gitlab-client/releases/download/v0.1.2/gitlab-client.phar
chmod +x gitlab-client.phar
sudo mv gitlab-client.phar /usr/local/bin/gitlab-client

composer 

gitlab-client list

php vendor\bin\gitlab-client list

gitlab-client build:child --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --repository yourRepositoryName --branch yourBranch

gitlab-client protect:branch --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --repository yourRepositoryName --branch yourBranch

phpunit --bootstrap vendor/autoload.php --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml
gitlab-client coverage:check --clover-file path/to/your/clover.xml --percentage 100

gitlab-client copy:members --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --source-group yourSourceGroup --destination-group yourDestinationGroup

gitlab-client replace:readme --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --repository yourRepositoryName --branch yourBranch