klesh commented on code in PR #2128:
URL: https://github.com/apache/incubator-devlake/pull/2128#discussion_r895832161
##########
plugins/github/github.go:
##########
@@ -95,7 +96,16 @@ func (plugin Github) PrepareTaskData(taskCtx
core.TaskContext, options map[strin
if op.Repo == "" {
return nil, fmt.Errorf("repo is required for GitHub execution")
}
- apiClient, err := tasks.CreateApiClient(taskCtx)
+
+ // find the only github now
+ // FIXME to query by connection id when multi connection support
+ connection := &models.GithubConnection{}
+ err = taskCtx.GetDb().First(connection, "name = ?", `GitHub`).Error
Review Comment:
Should be using ConnectionHelper to load connection, otherwise, the
AccessToken wont be decrypted properly
--
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]