mappjzc commented on code in PR #4359:
URL: 
https://github.com/apache/incubator-devlake/pull/4359#discussion_r1102501077


##########
backend/plugins/gitlab/tasks/mr_extractor.go:
##########
@@ -80,23 +82,36 @@ func ExtractApiMergeRequests(taskCtx plugin.SubTaskContext) 
errors.Error {
        var labelTypeRegex *regexp.Regexp
        var labelComponentRegex *regexp.Regexp
        var prType = config.PrType
-       var err error
+
+       var err1 error
        if len(prType) > 0 {
-               labelTypeRegex, err = regexp.Compile(prType)
-               if err != nil {
-                       return errors.Default.Wrap(err, "regexp Compile prType 
failed")
+               labelTypeRegex, err1 = regexp.Compile(prType)
+               if err1 != nil {
+                       return errors.Default.Wrap(err1, "regexp Compile prType 
failed")
                }
        }
        var prComponent = config.PrComponent
        if len(prComponent) > 0 {
-               labelComponentRegex, err = regexp.Compile(prComponent)
-               if err != nil {
-                       return errors.Default.Wrap(err, "regexp Compile 
prComponent failed")
+               labelComponentRegex, err1 = regexp.Compile(prComponent)
+               if err1 != nil {
+                       return errors.Default.Wrap(err1, "regexp Compile 
prComponent failed")
                }
        }
+       needDetail := false
+
        extractor, err := api.NewApiExtractor(api.ApiExtractorArgs{
                RawDataSubTaskArgs: *rawDataSubTaskArgs,
                Extract: func(row *api.RawData) ([]interface{}, errors.Error) {

Review Comment:
   too many places that use `row` but not `raw`.
   If it is needed, it is better to change them at the same time, but not here.
   
![image](https://user-images.githubusercontent.com/2921251/218054048-83ae0146-8f93-4f35-bdde-47546822f456.png)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to