Use correct endpoint to fetch the tag name of the latest release.
This commit is contained in:
parent
1a96cca5f2
commit
3eca175604
6
buku.py
6
buku.py
@ -2166,8 +2166,8 @@ def check_upstream_release():
|
||||
|
||||
try:
|
||||
r = requests.get(
|
||||
'https://api.github.com/repos/jarun/buku/tags?per_page=1',
|
||||
proxies=proxies
|
||||
'https://api.github.com/repos/jarun/buku/releases?per_page=1',
|
||||
proxies=proxies
|
||||
)
|
||||
except Exception as e:
|
||||
logerr(e)
|
||||
@ -2176,7 +2176,7 @@ def check_upstream_release():
|
||||
if r.status_code != 200:
|
||||
logerr('[%s] %s', r.status_code, r.reason)
|
||||
else:
|
||||
latest = r.json()[0]['name']
|
||||
latest = r.json()[0]['tag_name']
|
||||
if latest == 'v' + __version__:
|
||||
print('This is the latest release')
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user