mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
This uses the json api of mercurial repositories. Verified to work on the following hosting sites: www.mercurial-scm.org/repo hg.code.sf.net hg.nginx.org hg.mozilla.org
10 lines
286 B
Python
10 lines
286 B
Python
# MIT licensed
|
|
# Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al.
|
|
|
|
async def get_version(name, conf, *, cache, **kwargs):
|
|
url = conf.get('mercurial') + '/json-tags'
|
|
|
|
data = await cache.get_json(url)
|
|
|
|
version = [tag['tag'] for tag in data['tags']]
|
|
return version
|