From bd7b50bc8638d3b6c776dd974de32a1ea385c835 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 9 Feb 2020 22:17:10 +0100 Subject: github/gitlab: many fixes and improvments at the config step --- bridge/gitlab/export.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bridge/gitlab/export.go') diff --git a/bridge/gitlab/export.go b/bridge/gitlab/export.go index c5323da4..d747c6ac 100644 --- a/bridge/gitlab/export.go +++ b/bridge/gitlab/export.go @@ -47,7 +47,7 @@ func (ge *gitlabExporter) Init(repo *cache.RepoCache, conf core.Configuration) e ge.repositoryID = ge.conf[keyProjectID] // preload all clients - err := ge.cacheAllClient(repo) + err := ge.cacheAllClient(repo, ge.conf[keyGitlabBaseUrl]) if err != nil { return err } @@ -55,8 +55,12 @@ func (ge *gitlabExporter) Init(repo *cache.RepoCache, conf core.Configuration) e return nil } -func (ge *gitlabExporter) cacheAllClient(repo *cache.RepoCache) error { - creds, err := auth.List(repo, auth.WithTarget(target), auth.WithKind(auth.KindToken)) +func (ge *gitlabExporter) cacheAllClient(repo *cache.RepoCache, baseURL string) error { + creds, err := auth.List(repo, + auth.WithTarget(target), + auth.WithKind(auth.KindToken), + auth.WithMeta(auth.MetaKeyBaseURL, baseURL), + ) if err != nil { return err } -- cgit