3 namespace app\Controller\Github
;
5 use app\Controller\Github
;
6 use app\Github\API\Repos\RepoCallback
;
8 class Repo
extends Github
10 function __invoke(array $args = null) {
12 if ($this->checkToken()) {
13 list($repo) = $this->github
->readRepo("$owner/$name", new RepoCallback($this->github
))->send();
14 $hook = $this->github
->checkRepoHook($repo);
16 $this->app
->getView()->addData(compact("owner", "name", "repo", "hook"));
18 if (($modal = $this->app
->getRequest()->getQuery("modal"))) {
19 $action = $this->app
->getRequest()->getQuery($modal);
20 $this->app
->getView()->addData(compact("modal", "action"));
23 $this->app
->display("github/repo");