Skip to content

Commit

Permalink
refactoring to use simple ApiCollector (#7609) (#7743)
Browse files Browse the repository at this point in the history
Co-authored-by: sstojak1 <[email protected]>
Co-authored-by: Josip Stojak <[email protected]>
  • Loading branch information
3 people authored Jul 16, 2024
1 parent 5fa4200 commit 52433a8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions backend/plugins/bitbucket_server/tasks/pr_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -57,5 +53,5 @@ func CollectApiPullRequests(taskCtx plugin.SubTaskContext) errors.Error {
return err
}

return collectorWithState.Execute()
return collector.Execute()
}

0 comments on commit 52433a8

Please sign in to comment.