Repository navigation
Allow fetch prerelease - #495
crossan007 wants to merge 5 commits into
Conversation
|
Thank you for this PR. I like that you added both documentation and test. $latestRelease = $api->latestIncludingPrereleases('username', 'repo');Wouldn't the result be the same if you did: $latestRelease = $api->all('username', 'repo')[0];If so, I do not believe we need this PR. The API client should reflect the API and the API does not have a endpoint for getting the latest release including prereleases and drafts. Other maintainers/contributors may have different opinion though? |
|
Thanks for your reply - Your interpretation is correct. I just thought it would be nice to have an aptly named function to access the requested data. If nothing else, this PR (and issue #494) will serve as a reference for other users of this project who may want to access pre-releases within their application. |
|
What do you think about just updating the documentation and not the code? The documentation can show how you get the latest release including prereleases. |
|
Sure. I can update this PR |
| $release = $client->api('repo')->releases()->latest('twbs', 'bootstrap'); | ||
| ``` | ||
|
|
||
| The ```latest()``` method fetches only releases which are not marked "prerelease." |
There was a problem hiding this comment.
You should only use one backtick at each side of the word.
`latest()`
|
|
||
| The ```latest()``` method fetches only releases which are not marked "prerelease." | ||
|
|
||
| To obtain the latest release *including prereleases*, select the first element in the "all releases" function: |
There was a problem hiding this comment.
*including* prereleases and drafts,
There was a problem hiding this comment.
auth is required for drafts. I've added that to the doc also
| The ```latest()``` method fetches only releases which are not marked "prerelease." | ||
|
|
||
| To obtain the latest release *including prereleases*, select the first element in the "all releases" function: | ||
| ``` |
Nyholm
left a comment
There was a problem hiding this comment.
Excellent. Just a minor thing before I can merge
| $release = $client->api('repo')->releases()->latest('twbs', 'bootstrap'); | ||
| ``` | ||
|
|
||
| The `latest()` method fetches only releases which are not marked "prerelease" or "draft" |
There was a problem hiding this comment.
Bump, can you fix this minor so I can merge?
|
Closed by #519 |
closes #494