From aeec09645a89a9d5f3d0d0a56cca48b942b4c286 Mon Sep 17 00:00:00 2001 From: Dorian Boulc'h Date: Mon, 15 May 2017 20:53:58 +0200 Subject: [PATCH] fix: Replace spaces by underscores in repo names Gitlab allows spaces in repository names but Gogs not --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 25e8496..509df02 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "github.com/ewoutp/go-gitlab-client" "github.com/gogits/go-gogs-client" + "strings" ) var ( @@ -96,6 +97,7 @@ func main() { } func fixName(name string) string { + name = strings.Replace(name, " ", "_", -1) switch name { case "api": // reserved return "theapi"