feat: setup script to sync repos #114
3 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,10 @@
|
||||||
# Repo Sync
|
# Repo Sync
|
||||||
This subdir is intended for syncing repos on <gitlab.skynet.ie> with <gitlab.com>
|
This subdir is intended for syncing repos on <gitlab.skynet.ie> with <gitlab.com>
|
||||||
|
|
||||||
|
## CSV file
|
||||||
|
This file is in the format of local id and remote link.
|
||||||
|
It must end on a newline
|
||||||
|
|
||||||
## Tokens
|
## Tokens
|
||||||
Tokens have a lifetime of a year.
|
Tokens have a lifetime of a year.
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ Mirror-Create(){
|
||||||
local body="url=https://oauth2:$token_remote@$REPO&enabled=true&only_protected_branches=false&keep_divergent_refs=false"
|
local body="url=https://oauth2:$token_remote@$REPO&enabled=true&only_protected_branches=false&keep_divergent_refs=false"
|
||||||
local uri="https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors"
|
local uri="https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors"
|
||||||
echo $uri
|
echo $uri
|
||||||
echo $body
|
|
||||||
local tmp=""
|
local tmp=""
|
||||||
curl -X "POST" "$uri" --header "PRIVATE-TOKEN: $token" --data $body
|
curl -X "POST" "$uri" --header "PRIVATE-TOKEN: $token" --data $body
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue