aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-15 03:01:45 +0100
committerGitHub <noreply@github.com>2020-02-15 03:01:45 +0100
commit362c0c7e2e1ce9a8e2918376a340c76f46569d64 (patch)
tree29f04fae0dc3d5d4883d4989012c26109ba754dc /bridge/gitlab/import.go
parent2df72942f2b057956c7873f908b64880ab647331 (diff)
parentfe3d5c95e4be5874066402b5463ada34894c7f01 (diff)
downloadgit-bug-362c0c7e2e1ce9a8e2918376a340c76f46569d64.tar.gz
Merge pull request #325 from MichaelMure/bridge-refactor
bridges: massive refactor
Diffstat (limited to 'bridge/gitlab/import.go')
-rw-r--r--bridge/gitlab/import.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go
index 4fccb47e..c8d74bef 100644
--- a/bridge/gitlab/import.go
+++ b/bridge/gitlab/import.go
@@ -36,7 +36,7 @@ func (gi *gitlabImporter) Init(repo *cache.RepoCache, conf core.Configuration) e
creds, err := auth.List(repo,
auth.WithTarget(target),
auth.WithKind(auth.KindToken),
- auth.WithMeta(auth.MetaKeyBaseURL, conf[keyGitlabBaseUrl]),
+ auth.WithMeta(auth.MetaKeyBaseURL, conf[confKeyGitlabBaseUrl]),
)
if err != nil {
return err
@@ -46,7 +46,7 @@ func (gi *gitlabImporter) Init(repo *cache.RepoCache, conf core.Configuration) e
return ErrMissingIdentityToken
}
- gi.client, err = buildClient(conf[keyGitlabBaseUrl], creds[0].(*auth.Token))
+ gi.client, err = buildClient(conf[confKeyGitlabBaseUrl], creds[0].(*auth.Token))
if err != nil {
return err
}
@@ -57,7 +57,7 @@ func (gi *gitlabImporter) Init(repo *cache.RepoCache, conf core.Configuration) e
// ImportAll iterate over all the configured repository issues (notes) and ensure the creation
// of the missing issues / comments / label events / title changes ...
func (gi *gitlabImporter) ImportAll(ctx context.Context, repo *cache.RepoCache, since time.Time) (<-chan core.ImportResult, error) {
- gi.iterator = NewIterator(ctx, gi.client, 10, gi.conf[keyProjectID], since)
+ gi.iterator = NewIterator(ctx, gi.client, 10, gi.conf[confKeyProjectID], since)
out := make(chan core.ImportResult)
gi.out = out
@@ -147,8 +147,8 @@ func (gi *gitlabImporter) ensureIssue(repo *cache.RepoCache, issue *gitlab.Issue
core.MetaKeyOrigin: target,
metaKeyGitlabId: parseID(issue.IID),
metaKeyGitlabUrl: issue.WebURL,
- metaKeyGitlabProject: gi.conf[keyProjectID],
- metaKeyGitlabBaseUrl: gi.conf[keyGitlabBaseUrl],
+ metaKeyGitlabProject: gi.conf[confKeyProjectID],
+ metaKeyGitlabBaseUrl: gi.conf[confKeyGitlabBaseUrl],
},
)