-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.php
33 lines (26 loc) · 691 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
require_once(__DIR__ . '/client/GitHubClient.php');
$repos = array(
'server',
'installer',
);
$client = new GitHubClient();
foreach($repos as $repo)
{
$client->setPage();
$client->setPageSize(2);
$commits = $client->repos->commits->listCommitsOnRepository('kaltura', $repo);
echo "Count: " . count($commits) . "\n";
foreach($commits as $commit)
{
/* @var $commit GitHubCommit */
echo get_class($commit) . " - Sha: " . $commit->getSha() . "\n";
}
$commits = $client->getNextPage();
echo "Count: " . count($commits) . "\n";
foreach($commits as $commit)
{
/* @var $commit GitHubCommit */
echo get_class($commit) . " - Sha: " . $commit->getSha() . "\n";
}
}