Update _dots to pull list of repos from Gitea

I completely forgot I made the _dots completion function do this in the
first place. Past Dani did some really cool stuff! Anyway, the dot
repos now live on Gitea, so the completion function needs to fetch the
list from there instead. It's not difficult, the API is very simple.
This commit is contained in:
Danielle McLean 2021-07-15 09:18:45 +10:00
parent 154ac865d2
commit 8bfca07760
Signed by: 00dani
GPG key ID: 9DDE1EDE01E3A605

View file

@ -14,7 +14,7 @@ commands=(
status:'check whether your packages have changes'
)
if ! _retrieve_cache dots-repositories; then
repos=($(curl -s 'https://api.github.com/users/00dani/repos' | jq -r '.[].full_name | select(startswith("00dani/dot-")) | .[11:]'))
repos=($(curl -s -X GET "https://git.00dani.me/api/v1/orgs/dot/repos" -H "accept: application/json" | jq -r '.[].name'))
_store_cache dots-repositories repos
fi