PHP code example of mikolaykorniat / php-gitlab-api
1. Go to this page and download the library: Download mikolaykorniat/php-gitlab-api 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/ */
mikolaykorniat / php-gitlab-api example snippets
$client = new \Gitlab\Client('http://git.yourdomain.com/api/v3/'); // change here
$client->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN); // change here
$project = $client->api('projects')->create('My Project', array(
'description' => 'This is a project',
'issues_enabled' => false
));
$client = new \Gitlab\Client('http://git.yourdomain.com/api/v3/'); // change here
$client->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN); // change here
$project = \Gitlab\Model\Project::create($client, 'My Project', array(
'description' => 'This is my project',
'issues_enabled' => false
));
$project->addHook('http://mydomain.com/hook/push/1');
$project = new \Gitlab\Model\Project(1, $client);
$issue = $project->createIssue('This does not work..', array(
'description' => 'This doesnt work properly. Please fix',
'assignee_id' => 2
));
$issue->close();
"m4tthumphrey/php-gitlab-api": "dev-master"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.