diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-09 22:17:10 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-10 01:22:01 +0100 |
commit | bd7b50bc8638d3b6c776dd974de32a1ea385c835 (patch) | |
tree | 9d941dd499a3bffbbba3295c58a6b77b5b6feeca /bridge/gitlab/export.go | |
parent | 3caffeef4d2ed25d4eb5d4bfd262f4fc3b92561f (diff) | |
download | git-bug-bd7b50bc8638d3b6c776dd974de32a1ea385c835.tar.gz |
github/gitlab: many fixes and improvments at the config step
Diffstat (limited to 'bridge/gitlab/export.go')
-rw-r--r-- | bridge/gitlab/export.go | 10 |
1 files changed, 7 insertions, 3 deletions
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 } |