Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

How to get the latest release of a repository? #62

Open
@michaelkarrer81

Description

@michaelkarrer81

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions