Skip to content

Commit

Permalink
Fix Gogs repository visibility (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
seowalex authored May 2, 2023
1 parent fae97c2 commit 25288d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gogs/gogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 25288d6

Please sign in to comment.