diff --git a/doc/repo/releases.md b/doc/repo/releases.md index 31f5fa5e10d..b64468a8171 100644 --- a/doc/repo/releases.md +++ b/doc/repo/releases.md @@ -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