19 lines
403 B
Bash
Executable File
19 lines
403 B
Bash
Executable File
#!/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
|