getReleases() public method

Returned value must be an array with the following data per entry (values are by example). If a value is not supported null must be used instead. "url": "https://github.com/octocat/Hello-World/releases/v1.0.0" "id": 1 "name": "v1.0.0" "tag_name": "v1.0.0" "body": "Description of the release" "draft": false "prerelease": false "created_at": "DateTime Object" "published_at": "DateTime Object" "user": "username"
public getReleases ( ) : array[]
return array[] [['id' => 1, ...]]
Exemplo n.º 1
0
 private function removeExisting(Adapter $adapter, $tag)
 {
     $releases = $adapter->getReleases();
     $id = null;
     foreach ($releases as $release) {
         if ($tag == $release['tag_name']) {
             $id = $release['id'];
         }
     }
     if ($id) {
         $adapter->removeRelease($id);
         $this->getHelper('gush_style')->note(sprintf('Existing release with tag %s (id: %s) was removed.', $tag, $id));
     }
 }