5 use Monolog\Handler\StreamHandler
;
10 require_once __DIR__
."/../vendor/autoload.php";
12 $log = new Monolog\
Logger("seekat");
13 $log->pushHandler((new Monolog\Handler\
StreamHandler(STDERR
))
14 ->setLevel(Monolog\Logger
::WARNING
));
16 $cli = new http\
Client("curl", "seekat");
18 $api = new API(API\Future\amp
(), [
19 "Authorization" => "token ".getenv("GITHUB_TOKEN")
24 $subscribed = yield
$api->user
->subscriptions(["per_page" => 3]);
27 /* pro-actively queue the next request */
28 $next = Links\next
($subscribed);
29 foreach ($subscribed->getData() as $subscription) {
30 if ($subscription->fork
) {
31 printf("skipping fork %s\n", $subscription->full_name
);
35 printf("watching %s owned by %s (repo is %s)\n",
36 $subscription->full_name
,
37 $subscription->owner
->login
,
38 $subscription->private ?
"private" : "public"
41 $subscribed = yield
$next;
44 })->onResolve(function($error, $count) {
45 printf("Listed %d repos\n", $count);