29 lines
739 B
Bash
29 lines
739 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
TOKEN="2608ab5b7a8965190ab4d8503a8197a47b75b42c"
|
|
GITEA_URL="http://localhost:3000"
|
|
|
|
echo "Creating repository 'voidea' in Gitea..."
|
|
|
|
RESPONSE=$(curl -s -X POST "$GITEA_URL/api/v1/user/repos" \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: token $TOKEN" \
|
|
-d '{
|
|
"name": "voidea",
|
|
"description": "VoIdeaAI - voice-first AI idea assistant",
|
|
"private": false,
|
|
"auto_init": false,
|
|
"default_branch": "master"
|
|
}')
|
|
|
|
echo "Response: $RESPONSE"
|
|
|
|
if echo "$RESPONSE" | grep -q '"id"'; then
|
|
echo "Repository created successfully!"
|
|
echo "Clone URL: http://localhost:3000/angel/voidea.git"
|
|
echo "Web URL: http://git.voideaai.ru/angel/voidea"
|
|
else
|
|
echo "Failed to create repository."
|
|
fi
|