Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cherry pick #7609 refactoring to use simple ApiCollector to release-v1.0 #7743

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
}
Loading