diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-07-17 18:46:46 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-07-23 17:18:04 +0200 |
commit | e012b6c6226a0f4121e036b8829f28f238d87e46 (patch) | |
tree | 8fda3c6f02ea5f4a3e8408219903057dfbc19c60 /bridge | |
parent | ffb8d34e4f04b678b3f4785a8247762ca7c06c4a (diff) | |
download | git-bug-e012b6c6226a0f4121e036b8829f28f238d87e46.tar.gz |
bridge/gitlab: check notes system field
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/gitlab/import_notes.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bridge/gitlab/import_notes.go b/bridge/gitlab/import_notes.go index 438967de..37bf2834 100644 --- a/bridge/gitlab/import_notes.go +++ b/bridge/gitlab/import_notes.go @@ -31,6 +31,10 @@ const ( // and doesn't provide a field to specify the note type. We must parse the // note body to detect it type. func GetNoteType(n *gitlab.Note) (NoteType, string) { + if !n.System { + return NOTE_COMMENT, n.Body + } + if n.Body == "closed" { return NOTE_CLOSED, "" } @@ -79,8 +83,7 @@ func GetNoteType(n *gitlab.Note) (NoteType, string) { return NOTE_REMOVED_MILESTONE, "" } - // comment don't have a specific format - return NOTE_COMMENT, n.Body + return NOTE_UNKNOWN, "" } // getNewTitle parses body diff given by gitlab api and return it final form |