+ $call->saveToCache([$hooks, $links]);
+ $this->redirectBack($repo->full_name);
+ });
+ }
+ });
+ })->send();
+ }
+
+ function delHook($owner, $repo) {
+ $this->github->readRepo("$owner/$repo", function($repo) {
+ $call = $this->github->listHooks($repo->full_name, function($hooks) use($repo, &$call) {
+ $repo->hooks = $hooks;
+ if (($hook = $this->checkRepoHook($repo))) {
+ $this->github->deleteRepoHook($repo->full_name, $hook->id, function() use($repo, &$call) {
+ $call->dropFromCache();
+ $this->redirectBack($repo->full_name);