@@ -3,11 +3,12 @@ package main // must be main for plugin entry point
33import (
44 "context"
55 "fmt"
6- "github.com/merico-dev/lake/config"
7- errors "github.com/merico-dev/lake/errors"
86 "os"
97 "strconv"
108
9+ "github.com/merico-dev/lake/config"
10+ errors "github.com/merico-dev/lake/errors"
11+
1112 "github.com/merico-dev/lake/logger" // A pseudo type for Plugin Interface implementation
1213 lakeModels "github.com/merico-dev/lake/models"
1314 "github.com/merico-dev/lake/plugins/core"
@@ -88,17 +89,18 @@ func (plugin Gitlab) Execute(options map[string]interface{}, progress chan<- flo
8889 }
8990 if len (tasksToRun ) == 0 {
9091 tasksToRun = map [string ]bool {
91- "collectPipelines" : true ,
92- "collectCommits" : true ,
93- "CollectTags" : true ,
94- "collectMrs" : true ,
95- "collectMrNotes" : true ,
96- "collectMrCommits" : true ,
97- "enrichMrs" : true ,
98- "convertProjects" : true ,
99- "convertMrs" : true ,
100- "convertCommits" : true ,
101- "convertNotes" : true ,
92+ "collectPipelines" : true ,
93+ "collectCommits" : true ,
94+ "CollectTags" : true ,
95+ "collectMrs" : true ,
96+ "collectMrNotes" : true ,
97+ "collectMrCommits" : true ,
98+ "enrichMrs" : true ,
99+ "convertProjects" : true ,
100+ "convertMrs" : true ,
101+ "convertCommits" : true ,
102+ "convertMrsCommits" : true ,
103+ "convertNotes" : true ,
102104 }
103105 }
104106
@@ -215,6 +217,16 @@ func (plugin Gitlab) Execute(options map[string]interface{}, progress chan<- flo
215217 }
216218 }
217219 }
220+ if tasksToRun ["convertMrsCommits" ] {
221+ progress <- 0.85
222+ err = tasks .ConvertMergeRequestCommits (projectIdInt )
223+ if err != nil {
224+ return & errors.SubTaskError {
225+ SubTaskName : "convertMrsCommits" ,
226+ Message : err .Error (),
227+ }
228+ }
229+ }
218230 if tasksToRun ["convertNotes" ] {
219231 progress <- 0.9
220232 err = tasks .ConvertNotes (ctx , projectIdInt )
0 commit comments