diff options
author | Michael Muré <batolettre@gmail.com> | 2020-11-17 14:00:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 14:00:41 +0100 |
commit | 902997f53771babb2f9ea1bb6288c2ec295c4c9e (patch) | |
tree | ad6324380b701f7972115c85fc82b6d5b0c02a1f /bridge | |
parent | 25b0c71948fe4bf5b4f4b8ca91ffc4d2f8c47643 (diff) | |
parent | 5f2801be82a373da1b59d3eb77e9cfb8be2cb3c9 (diff) | |
download | git-bug-902997f53771babb2f9ea1bb6288c2ec295c4c9e.tar.gz |
Merge pull request #485 from MichaelMure/gitlab-title-fix
cleanup title on gitlab import
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/gitlab/import.go | 10 |
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, |