Updates
#42
Replies: 1 comment
-
Can get the latest release tag name from the github api and decode that since we use proper semantic versioning. Could use this library to then compare the versions. >>> import requests
>>> import pprint
>>> response = requests.get("https://api.github.com/repos/howroyd/simonsays/releases/latest")
>>> pprint.pp(response.json())
{'url': 'https://api.github.com/repos/howroyd/simonsays/releases/120603911',
'assets_url': 'https://api.github.com/repos/howroyd/simonsays/releases/120603911/assets',
'upload_url': 'https://uploads.github.com/repos/howroyd/simonsays/releases/120603911/assets{?name,label}',
'html_url': 'https://github.com/howroyd/simonsays/releases/tag/2.0.0',
'id': 120603911,
'author': {'login': 'howroyd',
'id': 4547783,
'node_id': 'MDQ6VXNlcjQ1NDc3ODM=',
'avatar_url': 'https://avatars.githubusercontent.com/u/4547783?v=4',
'gravatar_id': '',
'url': 'https://api.github.com/users/howroyd',
'html_url': 'https://github.com/howroyd',
'followers_url': 'https://api.github.com/users/howroyd/followers',
'following_url': 'https://api.github.com/users/howroyd/following{/other_user}',
'gists_url': 'https://api.github.com/users/howroyd/gists{/gist_id}',
'starred_url': 'https://api.github.com/users/howroyd/starred{/owner}{/repo}',
'subscriptions_url': 'https://api.github.com/users/howroyd/subscriptions',
'organizations_url': 'https://api.github.com/users/howroyd/orgs',
'repos_url': 'https://api.github.com/users/howroyd/repos',
'events_url': 'https://api.github.com/users/howroyd/events{/privacy}',
'received_events_url': 'https://api.github.com/users/howroyd/received_events',
'type': 'User',
'site_admin': False},
'node_id': 'RE_kwDOHwviGc4HMEUH',
'tag_name': '2.0.0',
'target_commitish': 'main',
'name': 'Version 2.0.0',
'draft': False,
'prerelease': False,
'created_at': '2023-09-11T08:48:59Z',
'published_at': '2023-09-11T08:54:49Z',
'assets': [{'url': 'https://api.github.com/repos/howroyd/simonsays/releases/assets/125494320',
'id': 125494320,
'node_id': 'RA_kwDOHwviGc4HeuQw',
'name': 'blocklist',
'label': '',
'uploader': {'login': 'github-actions[bot]',
'id': 41898282,
'node_id': 'MDM6Qm90NDE4OTgyODI=',
'avatar_url': 'https://avatars.githubusercontent.com/in/15368?v=4',
'gravatar_id': '',
'url': 'https://api.github.com/users/github-actions%5Bbot%5D',
'html_url': 'https://github.com/apps/github-actions',
'followers_url': 'https://api.github.com/users/github-actions%5Bbot%5D/followers',
'following_url': 'https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}',
'gists_url': 'https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}',
'starred_url': 'https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}',
'subscriptions_url': 'https://api.github.com/users/github-actions%5Bbot%5D/subscriptions',
'organizations_url': 'https://api.github.com/users/github-actions%5Bbot%5D/orgs',
'repos_url': 'https://api.github.com/users/github-actions%5Bbot%5D/repos',
'events_url': 'https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}',
'received_events_url': 'https://api.github.com/users/github-actions%5Bbot%5D/received_events',
'type': 'Bot',
'site_admin': False},
'content_type': 'application/zip',
'state': 'uploaded',
'size': 194,
'download_count': 222,
'created_at': '2023-09-11T08:59:10Z',
'updated_at': '2023-09-11T08:59:10Z',
'browser_download_url': 'https://github.com/howroyd/simonsays/releases/download/2.0.0/blocklist'},
{'url': 'https://api.github.com/repos/howroyd/simonsays/releases/assets/125494317',
'id': 125494317,
'node_id': 'RA_kwDOHwviGc4HeuQt',
'name': 'linux_release.tar.gz',
'label': '',
'uploader': {'login': 'github-actions[bot]',
'id': 41898282,
'node_id': 'MDM6Qm90NDE4OTgyODI=',
'avatar_url': 'https://avatars.githubusercontent.com/in/15368?v=4',
'gravatar_id': '',
'url': 'https://api.github.com/users/github-actions%5Bbot%5D',
'html_url': 'https://github.com/apps/github-actions',
'followers_url': 'https://api.github.com/users/github-actions%5Bbot%5D/followers',
'following_url': 'https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}',
'gists_url': 'https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}',
'starred_url': 'https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}',
'subscriptions_url': 'https://api.github.com/users/github-actions%5Bbot%5D/subscriptions',
'organizations_url': 'https://api.github.com/users/github-actions%5Bbot%5D/orgs',
'repos_url': 'https://api.github.com/users/github-actions%5Bbot%5D/repos',
'events_url': 'https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}',
'received_events_url': 'https://api.github.com/users/github-actions%5Bbot%5D/received_events',
'type': 'Bot',
'site_admin': False},
'content_type': 'application/zip',
'state': 'uploaded',
'size': 25258578,
'download_count': 0,
'created_at': '2023-09-11T08:59:08Z',
'updated_at': '2023-09-11T08:59:09Z',
'browser_download_url': 'https://github.com/howroyd/simonsays/releases/download/2.0.0/linux_release.tar.gz'},
{'url': 'https://api.github.com/repos/howroyd/simonsays/releases/assets/125494316',
'id': 125494316,
'node_id': 'RA_kwDOHwviGc4HeuQs',
'name': 'windows_release.zip',
'label': '',
'uploader': {'login': 'github-actions[bot]',
'id': 41898282,
'node_id': 'MDM6Qm90NDE4OTgyODI=',
'avatar_url': 'https://avatars.githubusercontent.com/in/15368?v=4',
'gravatar_id': '',
'url': 'https://api.github.com/users/github-actions%5Bbot%5D',
'html_url': 'https://github.com/apps/github-actions',
'followers_url': 'https://api.github.com/users/github-actions%5Bbot%5D/followers',
'following_url': 'https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}',
'gists_url': 'https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}',
'starred_url': 'https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}',
'subscriptions_url': 'https://api.github.com/users/github-actions%5Bbot%5D/subscriptions',
'organizations_url': 'https://api.github.com/users/github-actions%5Bbot%5D/orgs',
'repos_url': 'https://api.github.com/users/github-actions%5Bbot%5D/repos',
'events_url': 'https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}',
'received_events_url': 'https://api.github.com/users/github-actions%5Bbot%5D/received_events',
'type': 'Bot',
'site_admin': False},
'content_type': 'application/zip',
'state': 'uploaded',
'size': 13967380,
'download_count': 20,
'created_at': '2023-09-11T08:59:06Z',
'updated_at': '2023-09-11T08:59:07Z',
'browser_download_url': 'https://github.com/howroyd/simonsays/releases/download/2.0.0/windows_release.zip'}],
'tarball_url': 'https://api.github.com/repos/howroyd/simonsays/tarball/2.0.0',
'zipball_url': 'https://api.github.com/repos/howroyd/simonsays/zipball/2.0.0',
'body': "## What's Changed\r\n"
'* Thread pools by @howroyd in '
'https://github.com/howroyd/simonsays/pull/14\r\n'
'* Version2 by @howroyd in '
'https://github.com/howroyd/simonsays/pull/18\r\n'
'\r\n'
'\r\n'
'**Full Changelog**: '
'https://github.com/howroyd/simonsays/compare/0.11...2.0.0',
'discussion_url': 'https://github.com/howroyd/simonsays/discussions/25',
'mentions_count': 1} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would be nice if there was something on the GUI to mention when a new version is available
Beta Was this translation helpful? Give feedback.
All reactions