From f6b4830c0b68f3b5c616236bc9d51943765c8b4a Mon Sep 17 00:00:00 2001 From: amine Date: Tue, 10 Dec 2019 20:30:29 +0100 Subject: bridge/gitlab: support self-hosted GitLab instance --- bridge/gitlab/import.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bridge/gitlab/import.go') 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], }, ) -- cgit