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

likyh pushed a commit to branch release-v0.16
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.16 by this push:
     new 9116441e6 Hotfix/4631 (#4690)
9116441e6 is described below

commit 9116441e69945abe70a1c0b397bc9f23ecc6d153
Author: Likyh <[email protected]>
AuthorDate: Thu Mar 16 17:44:45 2023 +0800

    Hotfix/4631 (#4690)
    
    * fix: decrease page size for github graphql job collector (#4682)
    
    * fix: change pr collector detail input (#4687)
    
    * fix: change pr collector detail input
    
    * fix: for review
---
 backend/plugins/github/tasks/pr_collector.go          | 6 +++---
 backend/plugins/github_graphql/tasks/job_collector.go | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/backend/plugins/github/tasks/pr_collector.go 
b/backend/plugins/github/tasks/pr_collector.go
index 4456a9d3b..d22a47d77 100644
--- a/backend/plugins/github/tasks/pr_collector.go
+++ b/backend/plugins/github/tasks/pr_collector.go
@@ -44,7 +44,7 @@ var CollectApiPullRequestsMeta = plugin.SubTaskMeta{
 }
 
 type SimpleGithubPr struct {
-       GithubId int64
+       Number int64
 }
 
 type SimpleGithubApiPr struct {
@@ -102,7 +102,7 @@ func CollectApiPullRequests(taskCtx plugin.SubTaskContext) 
errors.Error {
                        BuildInputIterator: func() (helper.Iterator, 
errors.Error) {
                                // select pull id from database
                                cursor, err := db.Cursor(
-                                       dal.Select("github_id"),
+                                       dal.Select("number"),
                                        dal.From(&models.GithubPullRequest{}),
                                        dal.Where(
                                                "repo_id = ? AND connection_id 
= ? AND state != 'closed'",
@@ -115,7 +115,7 @@ func CollectApiPullRequests(taskCtx plugin.SubTaskContext) 
errors.Error {
                                return helper.NewDalCursorIterator(db, cursor, 
reflect.TypeOf(SimpleGithubPr{}))
                        },
                        FinalizableApiCollectorCommonArgs: 
helper.FinalizableApiCollectorCommonArgs{
-                               UrlTemplate: "repos/{{ .Params.Name }}/pulls/{{ 
.Input.GithubId }}",
+                               UrlTemplate: "repos/{{ .Params.Name }}/pulls/{{ 
.Input.Number }}",
                                ResponseParser: func(res *http.Response) 
([]json.RawMessage, errors.Error) {
                                        body, err := io.ReadAll(res.Body)
                                        if err != nil {
diff --git a/backend/plugins/github_graphql/tasks/job_collector.go 
b/backend/plugins/github_graphql/tasks/job_collector.go
index 9374a5595..8d3a1d285 100644
--- a/backend/plugins/github_graphql/tasks/job_collector.go
+++ b/backend/plugins/github_graphql/tasks/job_collector.go
@@ -140,7 +140,7 @@ func CollectGraphqlJobs(taskCtx plugin.SubTaskContext) 
errors.Error {
 
        err = 
collectorWithState.InitGraphQLCollector(helper.GraphqlCollectorArgs{
                Input:         iterator,
-               InputStep:     60,
+               InputStep:     20,
                Incremental:   incremental,
                GraphqlClient: data.GraphqlClient,
                BuildQuery: func(reqData *helper.GraphqlRequestData) 
(interface{}, map[string]interface{}, error) {

Reply via email to