aboutsummaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorAmine Hilaly <hilalyamine@gmail.com>2019-07-17 18:46:46 +0200
committerAmine Hilaly <hilalyamine@gmail.com>2019-07-23 17:18:04 +0200
commite012b6c6226a0f4121e036b8829f28f238d87e46 (patch)
tree8fda3c6f02ea5f4a3e8408219903057dfbc19c60 /bridge
parentffb8d34e4f04b678b3f4785a8247762ca7c06c4a (diff)
downloadgit-bug-e012b6c6226a0f4121e036b8829f28f238d87e46.tar.gz
bridge/gitlab: check notes system field
Diffstat (limited to 'bridge')
-rw-r--r--bridge/gitlab/import_notes.go7
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