https://bugzilla.redhat.com/show_bug.cgi?id=1834731



--- Comment #97 from Suvayu <[email protected]> ---
I think you can use the GH public API:
https://api.github.com/repos/bitcoin/bitcoin/releases

Something like the following in a script should work; I'm using curl and python
(no build dependencies)

  $ curl https://api.github.com/repos/bitcoin/bitcoin/releases >
bitcoin-releases.json
  $ python 
  >>> import json
  >>> with open("bitcoin-releases.json") as f:
  ...     data = json.load(f)
  ...
  >>> data[0]["author"]["login"]
  'laanwj'
  >>> data[0]["tag_name"]
  'v22.0'

If it's okay to add `jq` as a build dependency, you could also device a
oneliner by piping the output of curl.  Using the above JSON file, the
following works:

  $ cat bitcoin-releases.json | jq '.[0]["author"]["login"], .[0]["tag_name"]'
  "laanwj"
  "v22.0"

This does require network being enabled during the prebuild stage, does that
match with how koji is setup?  I would imagine it works, because downloading
source tarballs is a common requirement.

Hope this helps


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=1834731
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to