You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/06/08 18:41:13 UTC

[GitHub] [incubator-devlake] SnowMoon-Dev opened a new issue, #2130: [Feature][Helper/ApiCollector] Make query functions support getting file configuration information from context

SnowMoon-Dev opened a new issue, #2130:
URL: https://github.com/apache/incubator-devlake/issues/2130

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   
    Make query functions support getting file configuration information from context
   
   ### Use case
   
   In the query function, it is supported to obtain the token from the configuration, in order to request the following url : https://xxx.com/api/v5/repos/xxx/incubator-devlake/commits?access_token=02d1de27b9457cd&page=1&per_page=20
   
   ### Related issues
   
   [#2129](https://github.com/apache/incubator-devlake/issues/2129)
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.apache.org

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


[GitHub] [incubator-devlake] SnowMoon-Dev commented on issue #2130: [Feature][Helper/ApiCollector] Make query functions support getting token from collector.args.Params

Posted by GitBox <gi...@apache.org>.
SnowMoon-Dev commented on issue #2130:
URL: https://github.com/apache/incubator-devlake/issues/2130#issuecomment-1152131978

   The problem can be solved by changing the getQuery function into an anonymous function, no need to modify the Query interface


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


[GitHub] [incubator-devlake] SnowMoon-Dev commented on issue #2130: [Feature][Helper/ApiCollector] Make query functions support getting options information from context

Posted by GitBox <gi...@apache.org>.
SnowMoon-Dev commented on issue #2130:
URL: https://github.com/apache/incubator-devlake/issues/2130#issuecomment-1151848323

   I have seen the implementation of ApiClient.SetBeforeFunction, but it can't meet the needs. I am writing a plug-in for gitee. The verification mode of gitee is different from that of github and gitblab. The token is placed on the query condition.
   <img width="778" alt="image" src="https://user-images.githubusercontent.com/42627702/172977569-69d90110-9777-4f43-b868-12a101d16706.png">
   Here is my local implementation


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


[GitHub] [incubator-devlake] klesh commented on issue #2130: [Feature][Helper/ApiCollector] Make query functions support getting options information from context

Posted by GitBox <gi...@apache.org>.
klesh commented on issue #2130:
URL: https://github.com/apache/incubator-devlake/issues/2130#issuecomment-1151841149

   The use case doesn't seem legit.
   Why would authentication get passed by `task.options`?
   It should be with `connection` and handled by `ApiClient.SetBeforeFunction`, Check `plugins/github/tasks/api_client.go` for detail.
   Do you have any actual cases to prove the necessity of this PR?


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


[GitHub] [incubator-devlake] SnowMoon-Dev commented on issue #2130: [Feature][Helper/ApiCollector] Make query functions support getting token from collector.args.Params

Posted by GitBox <gi...@apache.org>.
SnowMoon-Dev commented on issue #2130:
URL: https://github.com/apache/incubator-devlake/issues/2130#issuecomment-1151862446

   > The use case doesn't seem legit. Why would authentication get passed by `task.options`? It should be with `connection` and handled by `ApiClient.SetBeforeFunction`, Check `plugins/github/tasks/api_client.go` for detail. Do you have any actual cases to prove the necessity of this PR?
   
   The previous idea was to get the token information in the configuration file env from the context of the task, and later @warren830  gave me a better suggestion


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


[GitHub] [incubator-devlake] SnowMoon-Dev closed issue #2130: [Feature][Helper/ApiCollector] Make query functions support getting token from collector.args.Params

Posted by GitBox <gi...@apache.org>.
SnowMoon-Dev closed issue #2130: [Feature][Helper/ApiCollector] Make query functions support getting token from collector.args.Params
URL: https://github.com/apache/incubator-devlake/issues/2130


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