aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import.go
diff options
context:
space:
mode:
authorvince <vincetiu8@gmail.com>2020-10-28 09:44:08 +0800
committervince <vincetiu8@gmail.com>2020-10-28 09:44:08 +0800
commit4f31e24467c885595f7c7272ca0054a9803c6e14 (patch)
tree1a11ae9af51dedf2ee5caace89e9e90b2048c154 /bridge/gitlab/import.go
parent86faedc966ed02507b98b28010bb6c85e0ecb55f (diff)
downloadgit-bug-4f31e24467c885595f7c7272ca0054a9803c6e14.tar.gz
cleanup title on gitlab import
Diffstat (limited to 'bridge/gitlab/import.go')
-rw-r--r--bridge/gitlab/import.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go
index 8aeab1ce..897d65de 100644
--- a/bridge/gitlab/import.go
+++ b/bridge/gitlab/import.go
@@ -138,7 +138,11 @@ func (gi *gitlabImporter) ensureIssue(repo *cache.RepoCache, issue *gitlab.Issue
}
// if bug was never imported
- cleanText, err := text.Cleanup(issue.Description)
+ cleanTitle, err := text.Cleanup(issue.Title)
+ if err != nil {
+ return nil, err
+ }
+ cleanDesc, err := text.Cleanup(issue.Description)
if err != nil {
return nil, err
}
@@ -147,8 +151,8 @@ func (gi *gitlabImporter) ensureIssue(repo *cache.RepoCache, issue *gitlab.Issue
b, _, err = repo.NewBugRaw(
author,
issue.CreatedAt.Unix(),
- issue.Title,
- cleanText,
+ cleanTitle,
+ cleanDesc,
nil,
map[string]string{
core.MetaKeyOrigin: target,