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


##########
generator/template/plugin/tasks/api_client.go-template:
##########
@@ -26,47 +26,59 @@ import (
 )
 
 // TODO add what host would want to requist
-const ENDPOINT = "{{ .Endpoint }}"
 
-func New{{ .PluginName }}ApiClient(taskCtx core.TaskContext) 
(*helper.ApiAsyncClient, error) {
-       // load and process configuration
-       token := taskCtx.GetConfig("{{ .PLUGIN_NAME }}_TOKEN")
-       if token == "" {
-               println("invalid {{ .PLUGIN_NAME }}_TOKEN, but ignore this 
error now")
+import (
+       "fmt"
+       "net/http"
+       "strconv"
+       "time"
+
+       "github.com/apache/incubator-devlake/plugins/{{ .pluginName }}/models"

Review Comment:
   fixed
   



##########
generator/template/plugin/tasks/api_client.go-template:
##########
@@ -26,47 +26,59 @@ import (
 )
 
 // TODO add what host would want to requist
-const ENDPOINT = "{{ .Endpoint }}"
 
-func New{{ .PluginName }}ApiClient(taskCtx core.TaskContext) 
(*helper.ApiAsyncClient, error) {
-       // load and process configuration
-       token := taskCtx.GetConfig("{{ .PLUGIN_NAME }}_TOKEN")
-       if token == "" {
-               println("invalid {{ .PLUGIN_NAME }}_TOKEN, but ignore this 
error now")
+import (

Review Comment:
   fixed
   



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