mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-22 07:08:58 +00:00
skip nested GitLab repositories during sync (#656)
Implements https://github.com/woodpecker-ci/woodpecker/pull/651#issuecomment-1003794674, partly fixes #648
This commit is contained in:
parent
7e6765ce95
commit
132d3567f4
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,7 @@ import (
|
|||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/xanzy/go-gitlab"
|
||||
|
||||
"github.com/woodpecker-ci/woodpecker/server"
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue