aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import.go
diff options
context:
space:
mode:
authoramine <hilalyamine@gmail.com>2019-12-10 20:30:29 +0100
committeramine <hilalyamine@gmail.com>2019-12-10 21:05:55 +0100
commitf6b4830c0b68f3b5c616236bc9d51943765c8b4a (patch)
tree324f36a49d1a26253bb1fc1ecc923d50aaed2912 /bridge/gitlab/import.go
parentf1ed857cbd3a253d77b31c0c896fdc4ade40844f (diff)
downloadgit-bug-f6b4830c0b68f3b5c616236bc9d51943765c8b4a.tar.gz
bridge/gitlab: support self-hosted GitLab instance
Diffstat (limited to 'bridge/gitlab/import.go')
-rw-r--r--bridge/gitlab/import.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go
index 00dee252..4fa37505 100644
--- a/bridge/gitlab/import.go
+++ b/bridge/gitlab/import.go
@@ -52,7 +52,10 @@ func (gi *gitlabImporter) Init(repo *cache.RepoCache, conf core.Configuration) e
return ErrMissingIdentityToken
}
- gi.client = buildClient(creds[0].(*auth.Token))
+ gi.client, err = buildClient(conf[keyGitlabBaseUrl], creds[0].(*auth.Token))
+ if err != nil {
+ return err
+ }
return nil
}
@@ -151,6 +154,7 @@ func (gi *gitlabImporter) ensureIssue(repo *cache.RepoCache, issue *gitlab.Issue
metaKeyGitlabId: parseID(issue.IID),
metaKeyGitlabUrl: issue.WebURL,
metaKeyGitlabProject: gi.conf[keyProjectID],
+ metaKeyGitlabBaseUrl: gi.conf[keyGitlabBaseUrl],
},
)