Back to the "Repos API" | Back to the navigation
Provides information about releases for a repository. Wraps GitHub Releases API.
$release = $client->api('repo')->releases()->latest('twbs', 'bootstrap');
The latest()
method fetches only releases which are not marked "prerelease" or "draft".
To obtain the latest release including prereleases and drafts, select the first element in the "all releases" function:
$release = $client->api('repo')->releases()->all('username', 'repo')[0];
Note: Draft releases are only visible to authenticated users who have push access to the repository.
$release = $client->api('repo')->releases()->tag('twbs', 'bootstrap', 'd890eec');
$releases = $client->api('repo')->releases()->all('twbs', 'bootstrap');
$release = $client->api('repo')->releases()->show('twbs', 'bootstrap', $id);
$release = $client->api('repo')->releases()->create('twbs', 'bootstrap', array('tag_name' => 'v1.1'));
$release = $client->api('repo')->releases()->edit('twbs', 'bootstrap', $id, array('name' => 'New release name'));
This works, but isn't thoroughly tested, use at your own risk.
$response = $client->api('repo')->releases()->remove('twbs', 'bootstrap', $id);