python-github3 icon indicating copy to clipboard operation
python-github3 copied to clipboard

How to get the latest release of a repository?

Open michaelkarrer81 opened this issue 8 years ago • 0 comments

I try to get the latest release of a repository but i cant figure out how to correctly do this with python-github3?

i know hot to get all the releases and i think that the first of them may be always the latest but is this true and how can i be sure?

latest_release = None
releases = online_repo.releases()
for release in releases:
    latest_release = release
    break

Just like in: GET /repos/:owner/:repo/releases/latest https://developer.github.com/v3/repos/releases/#get-the-latest-release

michaelkarrer81 avatar Feb 28 '17 09:02 michaelkarrer81