diff options
-rw-r--r-- | bridge/gitlab/import.go | 4 | ||||
-rw-r--r-- | bridge/gitlab/import_notes.go | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go index f65aba6a..e135b8bc 100644 --- a/bridge/gitlab/import.go +++ b/bridge/gitlab/import.go @@ -266,7 +266,9 @@ func (gi *gitlabImporter) ensureNote(repo *cache.RepoCache, b *cache.BugCache, n NOTE_CHANGED_DUEDATE, NOTE_REMOVED_DUEDATE, NOTE_LOCKED, - NOTE_UNLOCKED: + NOTE_UNLOCKED, + NOTE_MENTIONED_IN_ISSUE, + NOTE_MENTIONED_IN_MERGE_REQUEST: return nil default: diff --git a/bridge/gitlab/import_notes.go b/bridge/gitlab/import_notes.go index 85da3158..c0796037 100644 --- a/bridge/gitlab/import_notes.go +++ b/bridge/gitlab/import_notes.go @@ -23,6 +23,8 @@ const ( NOTE_UNASSIGNED NOTE_CHANGED_MILESTONE NOTE_REMOVED_MILESTONE + NOTE_MENTIONED_IN_ISSUE + NOTE_MENTIONED_IN_MERGE_REQUEST NOTE_UNKNOWN ) @@ -83,6 +85,14 @@ func GetNoteType(n *gitlab.Note) (NoteType, string) { return NOTE_REMOVED_MILESTONE, "" } + if strings.HasPrefix(n.Body, "mentioned in issue") { + return NOTE_MENTIONED_IN_ISSUE, "" + } + + if strings.HasPrefix(n.Body, "mentioned in merge request") { + return NOTE_MENTIONED_IN_MERGE_REQUEST, "" + } + return NOTE_UNKNOWN, "" } |