feature: Add Gitea docs

This commit is contained in:
Keith Solomon
2025-11-30 21:24:04 -06:00
parent 9291b641da
commit 474a967a24
7 changed files with 684 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
GITEA_BASE="https://git.keithsolomon.net"
GITEA_USER="keith" # your username
GITEA_TOKEN="f4b01fa50f56271f8ba002221fb68404de955077"
echo "Fetching repos for user: $GITEA_USER"
repos=$(curl -sS \
-H "Authorization: token $GITEA_TOKEN" \
"$GITEA_BASE/api/v1/users/$GITEA_USER/repos" | jq -r '.[].name')
for repo in $repos; do
echo "Setting $repo → public..."
curl -sS -X PATCH \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"private":false}' \
"$GITEA_BASE/api/v1/repos/$GITEA_USER/$repo" \
>/dev/null
echo "✓ $repo is now public"
done
echo "Done."