aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/export.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/export.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/export.go')
-rw-r--r--bridge/gitlab/export.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/bridge/gitlab/export.go b/bridge/gitlab/export.go
index d747c6ac..156aabaa 100644
--- a/bridge/gitlab/export.go
+++ b/bridge/gitlab/export.go
@@ -44,10 +44,10 @@ func (ge *gitlabExporter) Init(repo *cache.RepoCache, conf core.Configuration) e
ge.cachedOperationIDs = make(map[string]string)
// get repository node id
- ge.repositoryID = ge.conf[keyProjectID]
+ ge.repositoryID = ge.conf[confKeyProjectID]
// preload all clients
- err := ge.cacheAllClient(repo, ge.conf[keyGitlabBaseUrl])
+ err := ge.cacheAllClient(repo, ge.conf[confKeyGitlabBaseUrl])
if err != nil {
return err
}
@@ -81,7 +81,7 @@ func (ge *gitlabExporter) cacheAllClient(repo *cache.RepoCache, baseURL string)
}
if _, ok := ge.identityClient[user.Id()]; !ok {
- client, err := buildClient(ge.conf[keyGitlabBaseUrl], creds[0].(*auth.Token))
+ client, err := buildClient(ge.conf[confKeyGitlabBaseUrl], creds[0].(*auth.Token))
if err != nil {
return err
}
@@ -138,7 +138,7 @@ func (ge *gitlabExporter) ExportAll(ctx context.Context, repo *cache.RepoCache,
if snapshot.HasAnyActor(allIdentitiesIds...) {
// try to export the bug and it associated events
- ge.exportBug(ctx, b, since, out)
+ ge.exportBug(ctx, b, out)
}
}
}
@@ -148,7 +148,7 @@ func (ge *gitlabExporter) ExportAll(ctx context.Context, repo *cache.RepoCache,
}
// exportBug publish bugs and related events
-func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, since time.Time, out chan<- core.ExportResult) {
+func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out chan<- core.ExportResult) {
snapshot := b.Snapshot()
var bugUpdated bool
@@ -177,7 +177,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, sinc
gitlabID, ok := snapshot.GetCreateMetadata(metaKeyGitlabId)
if ok {
gitlabBaseUrl, ok := snapshot.GetCreateMetadata(metaKeyGitlabBaseUrl)
- if ok && gitlabBaseUrl != ge.conf[keyGitlabBaseUrl] {
+ if ok && gitlabBaseUrl != ge.conf[confKeyGitlabBaseUrl] {
out <- core.NewExportNothing(b.Id(), "skipping issue imported from another Gitlab instance")
return
}
@@ -189,7 +189,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, sinc
return
}
- if projectID != ge.conf[keyProjectID] {
+ if projectID != ge.conf[confKeyProjectID] {
out <- core.NewExportNothing(b.Id(), "skipping issue imported from another repository")
return
}