Initial import
This commit is contained in:
18
scripts/gitea-archive-org-repos.sh
Executable file
18
scripts/gitea-archive-org-repos.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Archiving repos in: $1"
|
||||
|
||||
GITEA_TOKEN=e21ba81d24ea0cea298eca47d0437411def37c66
|
||||
GITEA_URL="https://git.autonomic.zone/api/v1"
|
||||
|
||||
REPOS=$(http \
|
||||
"$GITEA_URL/orgs/$1/repos/?page=3" \
|
||||
Authorization:"token $GITEA_TOKEN" \
|
||||
| jq -r '.[].name')
|
||||
for repo in $REPOS; do
|
||||
echo "$repo"
|
||||
http PATCH \
|
||||
"$GITEA_URL/repos/$1/$repo" \
|
||||
Authorization:"token $GITEA_TOKEN" \
|
||||
archived:="true"
|
||||
done
|
||||
15
scripts/gitea-delete-org-repos.sh
Executable file
15
scripts/gitea-delete-org-repos.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Deleting repos in: $1"
|
||||
|
||||
GITEA_TOKEN=e21ba81d24ea0cea298eca47d0437411def37c66
|
||||
REPOS=$(http \
|
||||
"https://git.coopcloud.tech/api/v1/orgs/$1/repos?limit=100" \
|
||||
Authorization:"token $GITEA_TOKEN" \
|
||||
| jq -r '.[].name')
|
||||
for repo in $REPOS; do
|
||||
echo "$repo"
|
||||
http DELETE \
|
||||
https://git.coopcloud.tech/api/v1/repos/$1/$repo \
|
||||
Authorization:"token $GITEA_TOKEN"
|
||||
done
|
||||
9
scripts/gitea-delete-org.sh
Executable file
9
scripts/gitea-delete-org.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Deleting org: $1"
|
||||
|
||||
GITEA_TOKEN=e21ba81d24ea0cea298eca47d0437411def37c66
|
||||
http \
|
||||
DELETE \
|
||||
"https://git.coopcloud.tech/api/v1/orgs/$1" \
|
||||
Authorization:"token $GITEA_TOKEN"
|
||||
9
scripts/gitea-delete-users.sh
Executable file
9
scripts/gitea-delete-users.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Deleting user: $1"
|
||||
|
||||
GITEA_TOKEN=e21ba81d24ea0cea298eca47d0437411def37c66
|
||||
http \
|
||||
DELETE \
|
||||
"https://git.coopcloud.tech/api/v1/admin/users/$1" \
|
||||
Authorization:"token $GITEA_TOKEN"
|
||||
Reference in New Issue
Block a user