✨feature: Add Gitea docs
This commit is contained in:
26
assets/files/gitea/git-flip
Normal file
26
assets/files/gitea/git-flip
Normal 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."
|
||||
Reference in New Issue
Block a user