feat: setup script to sync repos #114

Merged
silver merged 8 commits from #50_mirror_using_gitlab.com into main 2023-12-27 22:22:17 +00:00
3 changed files with 5 additions and 2 deletions
Showing only changes of commit 8fecc941c7 - Show all commits

View file

@ -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.

View file

@ -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
} }