X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=app%2FController%2FGithub%2FRepo.php;h=ac2ce37d5916cebdb2a3fc68e8cb39f4c2fa1202;hb=917c0fd609f9d91fa6b407c4a1c853f2319eb23b;hp=8caba2af43ef2f7412a08b15a40be068451feabb;hpb=07b87ac26f62bc3c069bb16983fe7500272e19b4;p=pharext%2Fpharext.org diff --git a/app/Controller/Github/Repo.php b/app/Controller/Github/Repo.php index 8caba2a..ac2ce37 100644 --- a/app/Controller/Github/Repo.php +++ b/app/Controller/Github/Repo.php @@ -10,7 +10,7 @@ class Repo extends Github extract($args); $this->app->getView()->addData(compact("owner", "name")); if ($this->checkToken()) { - $this->github->fetchRepo( + $this->github->readRepo( "$owner/$name", [$this, "repoCallback"] )->send(); @@ -30,12 +30,13 @@ class Repo extends Github "title" => "Github: {$repo->name}" ]); settype($repo->tags, "object"); - $this->github->fetchHooks($repo->full_name, function($hooks) use($repo) { + $this->github->listHooks($repo->full_name, function($hooks) use($repo) { $repo->hooks = $hooks; + $this->app->getView()->addData(["hook" => $this->checkRepoHook($repo)]); }); - $this->github->fetchTags($repo->full_name, 1, $this->createTagsCallback($repo)); - $this->github->fetchReleases($repo->full_name, 1, $this->createReleasesCallback($repo)); - $this->github->fetchContents($repo->full_name, null, $this->createContentsCallback($repo)); + $this->github->listTags($repo->full_name, 1, $this->createTagsCallback($repo)); + $this->github->listReleases($repo->full_name, 1, $this->createReleasesCallback($repo)); + $this->github->readContents($repo->full_name, null, $this->createContentsCallback($repo)); } function createReleasesCallback($repo) { @@ -44,6 +45,9 @@ class Repo extends Github $tag = $release->tag_name; settype($repo->tags->$tag, "object"); $repo->tags->$tag->release = $release; + $this->github->listReleaseAssets($repo->full_name, $release->id, function($assets) use($release) { + $release->assets = $assets; + }); } }; }