repology: return a list of versions instead

to support list options. Returning the first isn't usually desirable.
This commit is contained in:
lilydjwg 2020-10-30 17:57:31 +08:00
parent 024849c242
commit b4689369c8
2 changed files with 4 additions and 3 deletions

View file

@ -570,8 +570,9 @@ repo
subrepo subrepo
Check the version in this subrepo. This field is optional. Check the version in this subrepo. This field is optional.
When ommited all subrepos are queried and first entry When ommited all subrepos are queried.
(not the highest version) is returned.
This source supports :ref:`list options`.
Check Anitya Check Anitya
~~~~~~~~~~~~ ~~~~~~~~~~~~

View file

@ -26,4 +26,4 @@ async def get_version(name, conf, *, cache, **kwargs):
repo=repo, subrepo=subrepo) repo=repo, subrepo=subrepo)
versions = [pkg['version'] for pkg in pkgs] versions = [pkg['version'] for pkg in pkgs]
return versions[0] return versions