You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2024/07/16 08:21:01 UTC

(incubator-devlake) branch cp-7609-release-v1.0 created (now 8fe757ef5)

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

klesh pushed a change to branch cp-7609-release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at 8fe757ef5 refactoring to use simple ApiCollector (#7609)

This branch includes the following new commits:

     new 8fe757ef5 refactoring to use simple ApiCollector (#7609)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-devlake) 01/01: refactoring to use simple ApiCollector (#7609)

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch cp-7609-release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 8fe757ef550ed09c585cb0812d487c18fc31f4d8
Author: sstojak1 <18...@users.noreply.github.com>
AuthorDate: Mon Jun 17 09:11:03 2024 +0200

    refactoring to use simple ApiCollector (#7609)
    
    Co-authored-by: Josip Stojak <Jo...@infobip.com>
---
 backend/plugins/bitbucket_server/tasks/pr_collector.go | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/backend/plugins/bitbucket_server/tasks/pr_collector.go b/backend/plugins/bitbucket_server/tasks/pr_collector.go
index 3a72ec8ba..d94442588 100644
--- a/backend/plugins/bitbucket_server/tasks/pr_collector.go
+++ b/backend/plugins/bitbucket_server/tasks/pr_collector.go
@@ -39,12 +39,8 @@ var CollectApiPullRequestsMeta = plugin.SubTaskMeta{
 
 func CollectApiPullRequests(taskCtx plugin.SubTaskContext) errors.Error {
 	rawDataSubTaskArgs, data := CreateRawDataSubTaskArgs(taskCtx, RAW_PULL_REQUEST_TABLE)
-	collectorWithState, err := helper.NewStatefulApiCollector(*rawDataSubTaskArgs)
-	if err != nil {
-		return err
-	}
 
-	err = collectorWithState.InitCollector(helper.ApiCollectorArgs{
+	collector, err := helper.NewApiCollector(helper.ApiCollectorArgs{
 		RawDataSubTaskArgs:    *rawDataSubTaskArgs,
 		ApiClient:             data.ApiClient,
 		PageSize:              100,
@@ -57,5 +53,5 @@ func CollectApiPullRequests(taskCtx plugin.SubTaskContext) errors.Error {
 		return err
 	}
 
-	return collectorWithState.Execute()
+	return collector.Execute()
 }