This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new b4c1d85cf fix: no pagination is used in the collectionAccounts of 
gitlab (#5134)
b4c1d85cf is described below

commit b4c1d85cf0d41d07233cf5ee3db16f8a23cc8450
Author: Klesh Wong <[email protected]>
AuthorDate: Tue May 9 15:04:21 2023 +0800

    fix: no pagination is used in the collectionAccounts of gitlab (#5134)
---
 backend/plugins/gitlab/tasks/account_collector.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/backend/plugins/gitlab/tasks/account_collector.go 
b/backend/plugins/gitlab/tasks/account_collector.go
index 67f27a9ff..43142938d 100644
--- a/backend/plugins/gitlab/tasks/account_collector.go
+++ b/backend/plugins/gitlab/tasks/account_collector.go
@@ -19,6 +19,7 @@ package tasks
 
 import (
        "encoding/json"
+       "fmt"
        "net/http"
        "net/url"
 
@@ -54,12 +55,11 @@ func CollectAccounts(taskCtx plugin.SubTaskContext) 
errors.Error {
                RawDataSubTaskArgs: *rawDataSubTaskArgs,
                ApiClient:          data.ApiClient,
                UrlTemplate:        urlTemplate,
-               //PageSize:           100,
+               PageSize:           100,
                Query: func(reqData *api.RequestData) (url.Values, 
errors.Error) {
                        query := url.Values{}
-                       // query.Set("sort", "asc")
-                       // query.Set("page", fmt.Sprintf("%v", 
reqData.Pager.Page))
-                       // query.Set("per_page", fmt.Sprintf("%v", 
reqData.Pager.Size))
+                       query.Set("page", fmt.Sprintf("%v", reqData.Pager.Page))
+                       query.Set("per_page", fmt.Sprintf("%v", 
reqData.Pager.Size))
                        return query, nil
                },
 

Reply via email to