~kris/dots

srice

ref: e98f3b030dc24445bd55c68d95d2d81933fd68b3 srice/.local/bin/srht-repos -rw-r--r-- 406 bytes
e98f3b03 — Kris Yotam chore: sync local state after restore (push updates, no pull) a month ago
                                                                                
1
2
3
4
5
6
7
8
9
#!/bin/sh
# srht-repos -- list all sr.ht repositories
set -eu

TOKEN=$(cat ~/.config/srht/token)

curl -s --oauth2-bearer "$TOKEN" -H 'Content-Type: application/json' \
  -d '{"query": "{ me { repositories { results { name visibility description updated } cursor } } }"}' \
  https://git.sr.ht/query | jq -r '.data.me.repositories.results[] | "\(.name)\t\(.visibility)\t\(.description // "")"' | column -t