- function __invoke($repo, $links = null) {
- $this->api->listHooks($repo->full_name, new HooksCallback($this->api, $repo));
- $this->api->listTags($repo->full_name, 1, new TagsCallback($this->api, $repo));
- $this->api->listReleases($repo->full_name, 1, new ReleasesCallback($this->api, $repo));
- $this->api->readContents($repo->full_name, null, new ContentsCallback($this->api, $repo));;
+ protected function exec($repo, $links = null) {
+ return Promise\all([
+ $repo,
+ $this->api->listHooks($repo->full_name)->then(new HooksCallback($this->api, $repo)),
+ $this->api->listTags($repo->full_name, 1)->then(new TagsCallback($this->api, $repo)),
+ $this->api->listReleases($repo->full_name, 1)->then(new ReleasesCallback($this->api, $repo)),
+ $this->api->readContents($repo->full_name)->then(new ContentsCallback($this->api, $repo)),
+ ]);