aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import_notes.go
diff options
context:
space:
mode:
authorAmine Hilaly <hilalyamine@gmail.com>2019-07-23 19:16:52 +0200
committerAmine Hilaly <hilalyamine@gmail.com>2019-07-23 19:49:53 +0200
commit29fdd37ce69b48aa9fc3c1b829ff67818041068f (patch)
tree598301ce5183f5029d58ad40d7dd309dc5799c87 /bridge/gitlab/import_notes.go
parent0c8f1c3a58c4707284cc6368af26715520a220c0 (diff)
downloadgit-bug-29fdd37ce69b48aa9fc3c1b829ff67818041068f.tar.gz
bridge/github: add getNewTitle tests
Diffstat (limited to 'bridge/gitlab/import_notes.go')
-rw-r--r--bridge/gitlab/import_notes.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/bridge/gitlab/import_notes.go b/bridge/gitlab/import_notes.go
index 06c0a242..85da3158 100644
--- a/bridge/gitlab/import_notes.go
+++ b/bridge/gitlab/import_notes.go
@@ -30,6 +30,7 @@ const (
func GetNoteType(n *gitlab.Note) (NoteType, string) {
// when a note is a comment system is set to false
// when a note is a different event system is set to true
+ // because Gitlab
if !n.System {
return NOTE_COMMENT, n.Body
}
@@ -88,6 +89,7 @@ func GetNoteType(n *gitlab.Note) (NoteType, string) {
// getNewTitle parses body diff given by gitlab api and return it final form
// examples: "changed title from **fourth issue** to **fourth issue{+ changed+}**"
// "changed title from **fourth issue{- changed-}** to **fourth issue**"
+// because Gitlab
func getNewTitle(diff string) string {
newTitle := strings.Split(diff, "** to **")[1]
newTitle = strings.Replace(newTitle, "{+", "", -1)