Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/repo/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ 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:
```php
$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.

### List releases for a tag

```php
Expand Down