aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/gitlab')
-rw-r--r--bridge/gitlab/gitlab.go14
-rw-r--r--bridge/gitlab/import.go2
2 files changed, 7 insertions, 9 deletions
diff --git a/bridge/gitlab/gitlab.go b/bridge/gitlab/gitlab.go
index d0faf1ef..743ab172 100644
--- a/bridge/gitlab/gitlab.go
+++ b/bridge/gitlab/gitlab.go
@@ -1,6 +1,7 @@
package gitlab
import (
+ "net/http"
"time"
"github.com/xanzy/go-gitlab"
@@ -9,9 +10,7 @@ import (
)
const (
- target = "gitlab"
- gitlabV4Url = "https://gitlab.com/api/v4"
-
+ target = "gitlab"
keyProjectID = "project-id"
keyGitlabId = "gitlab-id"
keyGitlabUrl = "gitlab-url"
@@ -42,10 +41,9 @@ func (*Gitlab) NewExporter() core.Exporter {
}
func buildClient(token string) *gitlab.Client {
- return gitlab.NewClient(nil, token)
-}
-
-func buildClientFromUsernameAndPassword(username, password string) (*gitlab.Client, error) {
- return gitlab.NewBasicAuthClient(nil, "https://gitlab.com", username, password)
+ client := &http.Client{
+ Timeout: defaultTimeout,
+ }
+ return gitlab.NewClient(client, token)
}
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go
index 6227767b..6869a103 100644
--- a/bridge/gitlab/import.go
+++ b/bridge/gitlab/import.go
@@ -120,7 +120,7 @@ func (gi *gitlabImporter) ensureIssue(repo *cache.RepoCache, issue *gitlab.Issue
return b, nil
}
- return nil, nil
+ return b, nil
}
func (gi *gitlabImporter) ensureNote(repo *cache.RepoCache, b *cache.BugCache, note *gitlab.Note) error {