Powiadomienia
Wyczyść wszystko
BugOverflow
2
Wpisy
1
Użytkownicy
0
Reactions
713
Widoki
0
30/04/2022 8:13 pm
Rozpoczynający temat
example
2 odpowiedzi
0
30/04/2022 9:19 pm
Rozpoczynający temat
private $projectUrl = "MY_SELFHOSTED_GITLAB";
private $secretToken = "MY_TOKEN";
private $client = null;
private $projectId = 1;
public function __construct()
{
$this->client = new \Gitlab\Client();
$this->client->setUrl($this->projectUrl);
$this->client->authenticate($this->secretToken, \Gitlab\Client::AUTH_HTTP_TOKEN);
}
public function issues()
{
$parameters = [
"scope" => "all",
"per_page" => 100,
"page" => 1,
];
return $this->client->issues()->all($this->projectId, $parameters);
}
0
30/04/2022 9:25 pm
Rozpoczynający temat
and for commits
public function commits()
{
$pager = new \Gitlab\ResultPager($this->client,100);
return $pager->fetchAll($this->client->repositories(), 'commits', [$this->projectId]);
}
