aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/gitlab/import.go')
-rw-r--r--bridge/gitlab/import.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go
index b2db13d0..67d9aa25 100644
--- a/bridge/gitlab/import.go
+++ b/bridge/gitlab/import.go
@@ -95,7 +95,7 @@ func (gi *gitlabImporter) ensureIssue(repo *cache.RepoCache, issue *gitlab.Issue
// if bug was never imported
if err == bug.ErrBugNotExist {
- cleanText, err := text.Cleanup(string(issue.Description))
+ cleanText, err := text.Cleanup(issue.Description)
if err != nil {
return nil, err
}
@@ -261,10 +261,12 @@ func (gi *gitlabImporter) ensureNote(repo *cache.RepoCache, b *cache.BugCache, n
return err
- default:
- // non handled note types, this is not an error
+ case NOTE_UNKNOWN:
//TODO: send warning via channel
return nil
+
+ default:
+ panic("unhandled note type")
}
return nil
@@ -322,9 +324,6 @@ func (gi *gitlabImporter) ensurePerson(repo *cache.RepoCache, id int) (*cache.Id
return nil, err
}
- // importing a new identity
- gi.importedIdentities++
-
client := buildClient(gi.conf["token"])
user, _, err := client.Users.GetUser(id)
@@ -332,6 +331,9 @@ func (gi *gitlabImporter) ensurePerson(repo *cache.RepoCache, id int) (*cache.Id
return nil, err
}
+ // importing a new identity
+ gi.importedIdentities++
+
return repo.NewIdentityRaw(
user.Name,
user.PublicEmail,