Skip to content

Commit

Permalink
skip nested GitLab repositories during sync (#656)
Browse files Browse the repository at this point in the history
Implements #651 (comment), partly fixes #648
  • Loading branch information
jdoubleu authored Jan 3, 2022
1 parent 7e6765c commit 132d356
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 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,13 @@ func (g *Gitlab) Repos(ctx context.Context, user *model.User) ([]*model.Repo, er
if err != nil {
return nil, err
}

// TODO(648) remove when woodpecker understands nested repos
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 132d356

Please sign in to comment.