mirror of
https://gitverse.ru/kpa39l/gotosocial.git
synced 2026-11-27 06:30:07 +00:00
5733bbb285
- scripts/sync-upstream-forks.sh: mirror gts/phanpy upstream → gitverse (kpa39l/gotosocial-ru, phanpy-ru) - scripts/apply-net-rules.sh + systemd/apply-gts-net-rules.service: policy-route 172.29.0.0/16 через WG vps02 (10.8.0.4) — стабильная федерация - probe/push скрипты для gitverse (fork creation, mirror push) - docs/i18n-analysis-ru.md: анализ русификации - openspec change setup-upstream-forks (proposal/spec/tasks) - .gitignore: forks/ (bare-зеркала 700M) + docker-compose.yml.bak-*
32 lines
1.1 KiB
Bash
32 lines
1.1 KiB
Bash
#!/bin/bash
|
|
# Попытка создать форк на gitverse через API (форматы Gitea)
|
|
set -e
|
|
source /opt/hermes/.hermes/secrets/git-tokens.env
|
|
AUTH="Authorization: Bearer $GITVERSE_PAT"
|
|
ACCEPT="Accept: application/vnd.gitverse.object+json;version=1"
|
|
CT="Content-Type: application/json"
|
|
API="https://api.gitverse.ru"
|
|
|
|
attempt() {
|
|
desc="$1"; url="$2"; body="$3"
|
|
echo "=== $desc ==="
|
|
curl -s -X POST -H "$AUTH" -H "$ACCEPT" -H "$CT" -d "$body" "$url" -w "\nHTTP %{http_code}\n" | tail -6
|
|
echo
|
|
}
|
|
|
|
attempt "Gitea-style: /repos/{owner}/{repo}/forks (POST + organization)" \
|
|
"$API/repos/superseriousbusiness/gotosocial/forks" \
|
|
'{}'
|
|
|
|
attempt "Gitea-style c org=null" \
|
|
"$API/repos/superseriousbusiness/gotosocial/forks" \
|
|
'{"organization":null}'
|
|
|
|
attempt "GitHub-style: /user/repos + parent" \
|
|
"$API/user/repos" \
|
|
'{"name":"gotosocial-ru","private":false,"parent":"superseriousbusiness/gotosocial"}'
|
|
|
|
# этот эндпоинт был 400 (не 404) — пробуем варианты тела
|
|
attempt "user/repos/{owner}/{repo}/forks" \
|
|
"$API/user/repos/superseriousbusiness/gotosocial/forks" \
|
|
'{}' |