initial commit
This commit is contained in:
28
import.sh
Executable file
28
import.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source config.sh
|
||||
|
||||
if [ "$2" != "false" ]
|
||||
then
|
||||
private=true
|
||||
else
|
||||
private=false
|
||||
fi
|
||||
|
||||
curl -sX 'POST' \
|
||||
"${GT_DOMAIN}/api/v1/repos/migrate" \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Authorization: token '${GT_TOKEN}'' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"auth_token": "'${GL_TOKEN}'",
|
||||
"clone_addr": "'${GL_DOMAIN}'/'${GL_USER}'/'$1'",
|
||||
"mirror": false,
|
||||
"private": '$private',
|
||||
"pull_requests": true,
|
||||
"releases": true,
|
||||
"repo_name": "'$1'",
|
||||
"repo_owner": "'${GT_USER}'",
|
||||
"service": "gitlab",
|
||||
"wiki": true
|
||||
}' | jq -r '.id'
|
||||
Reference in New Issue
Block a user