klesh commented on code in PR #8547:
URL:
https://github.com/apache/incubator-devlake/pull/8547#discussion_r2297351537
##########
backend/plugins/jira/tasks/epic_collector.go:
##########
@@ -98,6 +117,10 @@ func CollectEpics(taskCtx plugin.SubTaskContext)
errors.Error {
query.Set("startAt", fmt.Sprintf("%v",
reqData.Pager.Skip))
Review Comment:
There’s already a mechanism for handling this kind of API. Here’s how you
can enable it:
1. Specify `GetNextPageCustomData` in `ApiCollectorArgs` to extract the
`nextPageToken`.
- This token will be stored in the `RequestData.CustomData` field.
- Note: this also forces the collector to run in sequential mode (no
parallel fetching).
2. In the `Query` function, read the `CustomData` and plug it into the query
string.
Here’s an example:
https://github.com/apache/incubator-devlake/blob/52433a8bc098eba668a02d815d618409aa375b93/backend/plugins/bitbucket_server/tasks/pr_collector.go#L47-L48
--
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]