fedora-infra / anitya

A cross-distribution upstream release monitoring project
https://release-monitoring.org
GNU General Public License v2.0
243 stars 104 forks source link

RFE: Expose latest version #1796

Open LecrisUT opened 1 month ago

LecrisUT commented 1 month ago

The suggestion is to provide an API endpoint to query the latest version of a project in a few ways:

Zlopez commented 1 month ago

This seems similar to what /api/v2/versions provide. See https://anitya.readthedocs.io/en/stable/api.html#get--api-v2-versions-

LecrisUT commented 1 month ago

Oh, that's rather divergent from the json-schema: https://github.com/fedora-infra/anitya-messages/blob/7754ca6832fd773e9d8e622024743af0483cec9d/anitya_schema/project_messages.py#L692-L729

Indeed it is similar, but having the distinction between the 3 variants will be helpful because it is unclear if latest version is highest or newest version. Distributions like Spack would be helpful to track all newest version events because they keep the sha for all versions, while distro would rather have latest version.

Zlopez commented 1 month ago

Anitya doesn't take latest as newest, it depends on the project version scheme. But we can definitely return the latest retrieved.

The json-schema is for Fedora messages, not used by API at all.