eepm icon indicating copy to clipboard operation
eepm copied to clipboard

Use github api for release listing

Open vitlav opened this issue 10 months ago • 1 comments

Github has an api for getting releases. I've seen someone at AUR even use it. Apparently, it is described on the page https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release But as I understand it, a token is required for access, and there is no free access to this information.

We need information about the available releases, given the pre-release flag.

vitlav avatar Apr 13 '24 12:04 vitlav

From the page you provided:

This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested.

Maks1mS avatar Apr 19 '24 19:04 Maks1mS

To get all releases with all asets you just need the command

curl -s "https://api.github.com/repos/user/repo/releases" | jq -r '.[] | .assets[].browser_download_url'.

To ignore pre-releases

curl -s "https://api.github.com/repos/user/repo/releases" | jq -r '.[] | select(.prerelease == false) | .assets[].browser_download_url''

Boria138 avatar May 24 '24 10:05 Boria138