Skip to content

Commit

Permalink
skip nested GitLab repositories during sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoubleu committed Jan 3, 2022
1 parent a2429eb commit 2048be4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/remote/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"net/url"
"strings"

"github.com/rs/zerolog/log"
"github.com/xanzy/go-gitlab"

"github.com/woodpecker-ci/woodpecker/server"
Expand Down Expand Up @@ -249,6 +250,12 @@ func (g *Gitlab) Repos(ctx context.Context, user *model.User) ([]*model.Repo, er
if err != nil {
return nil, err
}

if strings.Count(repo.FullName, "/") > 1 {
log.Debug().Msgf("Skipping nested repository %s for user %s, because they are not supported, yet (see #648).", repo.FullName, user.Login)
continue
}

repos = append(repos, repo)
}

Expand Down

0 comments on commit 2048be4

Please sign in to comment.