likyh commented on code in PR #4292:
URL:
https://github.com/apache/incubator-devlake/pull/4292#discussion_r1094103022
##########
backend/plugins/bitbucket/tasks/api_common.go:
##########
@@ -65,8 +65,8 @@ func CreateRawDataSubTaskArgs(taskCtx plugin.SubTaskContext,
Table string) (*api
func GetQuery(reqData *api.RequestData) (url.Values, errors.Error) {
query := url.Values{}
query.Set("state", "all")
- query.Set("page", fmt.Sprintf("%v", reqData.Pager.Page))
- query.Set("pagelen", fmt.Sprintf("%v", reqData.Pager.Size))
+ query.Set("start", fmt.Sprintf("%v",
reqData.Pager.Page*reqData.Pager.Size))
Review Comment:
I try to user start/limit, but it just reqeust the first page. That means
`start/limit` are not work.
https://developer.atlassian.com/cloud/bitbucket/rest/intro/#pagination
So I think `page/pagelen` is right. We need add `GetTotalPages` for
collector to avoid this issue.
##########
backend/plugins/bitbucket/tasks/api_common.go:
##########
@@ -65,8 +65,8 @@ func CreateRawDataSubTaskArgs(taskCtx plugin.SubTaskContext,
Table string) (*api
func GetQuery(reqData *api.RequestData) (url.Values, errors.Error) {
query := url.Values{}
query.Set("state", "all")
- query.Set("page", fmt.Sprintf("%v", reqData.Pager.Page))
- query.Set("pagelen", fmt.Sprintf("%v", reqData.Pager.Size))
+ query.Set("start", fmt.Sprintf("%v",
reqData.Pager.Page*reqData.Pager.Size))
Review Comment:
I try to user start/limit, but it just reqeust the first page. That means
`start/limit` are not work.
https://developer.atlassian.com/cloud/bitbucket/rest/intro/#pagination
So I think `page/pagelen` is right. We need to add `GetTotalPages` for
collector to avoid this issue.
--
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]