warren830 commented on code in PR #2212:
URL: https://github.com/apache/incubator-devlake/pull/2212#discussion_r898849388


##########
plugins/gitlab/impl/impl.go:
##########
@@ -82,8 +85,23 @@ func (plugin Gitlab) PrepareTaskData(taskCtx 
core.TaskContext, options map[strin
        if err != nil {
                return nil, err
        }
-
+       if op.ConnectionId == 0 {
+               return nil, fmt.Errorf("connectionId is invalid")
+       }
+       connection := &models.GitlabConnection{}
+       connectionHelper := helper.NewConnectionHelper(
+               taskCtx,
+               nil,
+       )
+       if err != nil {
+               return nil, err
+       }
+       err = connectionHelper.FirstById(connection, op.ConnectionId)
+       if err != nil {
+               return nil, err
+       }
        apiClient, err := tasks.NewGitlabApiClient(taskCtx)

Review Comment:
   I didn't see getConfig here...



-- 
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