~kris/dots

srice

ref: 65bd807cfdd6651a480f8fc70ed41ef82abaf64b srice/.local/bin/srht-repos -rwxr-xr-x 406 bytes
65bd807c — Kris Yotam mksh: skip stale history log on first prompt render 3 months 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