5 require_once __DIR__
."/config.php";
9 $injector->share(Github\API
::class)
10 ->delegate(Github\API
::class, function() use($injector) {
11 $config = $injector->make(Config
::class);
12 if (isset($config->github
->hook
->use_basic_auth
)) {
13 $basic = $config->github
->hook
->use_basic_auth
;
14 $config->github
->hook
->url
= (string) new Url(
15 $config->github
->hook
->url
,
16 $config->$basic->auth
->toArray(),
19 // FIXME: configure through app.ini
20 return new Github\
API(
22 ,new Github\
Logger($config)
23 ,new Github\Storage\
Session("gh-tokens")
24 #,new Github\Storage\Memcache("gh-cache")
25 ,new Github\Storage\
Redis("gh-cache")