glanceapp / glance

A self-hosted dashboard that puts all your feeds in one place
GNU Affero General Public License v3.0
7.49k stars 260 forks source link

Use GitHub's latest release API endpoint #134

Closed wfg closed 3 months ago

wfg commented 3 months ago

The current releases widget uses the releases endpoint to pull the 10 most recent releases and filter them to find the latest release. This causes a problem when a repository's latest release is outside of the 10 most recent (e.g. 10 prereleases):

ERROR No live release found repository=cross-seed/cross-seed url="https://api.github.com/repos/cross-seed/cross-seed/releases?per_page=10"

This is no longer a problem when using the latest release endpoint which grabs the latest release, ignoring draft releases and prereleases.

svilenmarkov commented 3 months ago

Thanks for sorting that out!

I couldn't find that endpoint in the docs when looking for it and didn't think to try /latest. 😅