From 25288d6df2286143f90e19927a8ffd81542714c8 Mon Sep 17 00:00:00 2001 From: Seow Alex Date: Tue, 2 May 2023 23:17:30 +0800 Subject: [PATCH] Fix Gogs repository visibility (#149) --- gogs/gogs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gogs/gogs.go b/gogs/gogs.go index ac75213..b91c830 100644 --- a/gogs/gogs.go +++ b/gogs/gogs.go @@ -8,20 +8,20 @@ import ( "github.com/rs/zerolog/log" ) -func getRepoVisibility(visibility string) bool { +func getRepoVisibility(visibility string, private bool) bool { switch visibility { case "public": return false case "private": return true default: - return true + return private } } // Backup TODO. func Backup(r types.Repo, d types.GenRepo, dry bool) bool { - repovisibility := getRepoVisibility(d.Visibility.Repositories) + repovisibility := getRepoVisibility(d.Visibility.Repositories, r.Private) log.Info(). Str("stage", "gogs"). Str("url", d.URL).