You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "keon94 (via GitHub)" <gi...@apache.org> on 2023/06/22 21:10:34 UTC

[GitHub] [incubator-devlake] keon94 commented on a diff in pull request #5550: Proxy fixes for github_graphql and gitextractor

keon94 commented on code in PR #5550:
URL: https://github.com/apache/incubator-devlake/pull/5550#discussion_r1239034291


##########
backend/plugins/github_graphql/impl/impl.go:
##########
@@ -166,7 +167,30 @@ func (p GithubGraphql) PrepareTaskData(taskCtx plugin.TaskContext, options map[s
 	src := oauth2.StaticTokenSource(
 		&oauth2.Token{AccessToken: tokens[0]},
 	)
-	httpClient := oauth2.NewClient(taskCtx.GetContext(), src)
+	oauthContext := taskCtx.GetContext()

Review Comment:
   I suggest refactoring all of this logic into a NewOauth2Client method inside `api_client.go`, and reusing it across these plugins.



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org