Skip to content

Commit bd3318d

Browse files
authored
Replace #495 (#519)
* allow fetching prerelease data * fix line endings * use 0th element for test * only update documentation * update docs by request. add draft auth detail * fixed typo
1 parent 875971e commit bd3318d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/repo/releases.md

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ Provides information about releases for a repository. Wraps [GitHub Releases API
99
$release = $client->api('repo')->releases()->latest('twbs', 'bootstrap');
1010
```
1111

12+
The `latest()` method fetches only releases which are not marked "prerelease" or "draft".
13+
14+
To obtain the latest release *including* prereleases and drafts, select the first element in the "all releases" function:
15+
```php
16+
$release = $client->api('repo')->releases()->all('username', 'repo')[0];
17+
```
18+
19+
Note: Draft releases are only visible to authenticated users who have push access to the repository.
20+
1221
### List releases for a tag
1322

1423
```php

0 commit comments

Comments
 (0)