keon94 commented on code in PR #2401: URL: https://github.com/apache/incubator-devlake/pull/2401#discussion_r931678140
########## plugins/jira/tasks/epic_collector.go: ########## @@ -0,0 +1,145 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tasks + +import ( + "fmt" + "github.com/apache/incubator-devlake/plugins/core" + "github.com/apache/incubator-devlake/plugins/core/dal" + "strings" + + "encoding/json" + "github.com/apache/incubator-devlake/plugins/helper" + "io/ioutil" + "net/http" + "net/url" +) + +const RAW_EPIC_TABLE = "jira_api_epics" + +type JiraEpicParams struct { + ConnectionId uint64 + BoardId uint64 +} + +var _ core.SubTaskEntryPoint = CollectIssues + +var CollectEpicsMeta = core.SubTaskMeta{ + Name: "collectEpics", + EntryPoint: CollectEpics, + EnabledByDefault: true, + Description: "collect Jira epics from all boards", + DomainTypes: []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS}, +} + +func CollectEpics(taskCtx core.SubTaskContext) error { + db := taskCtx.GetDal() + data := taskCtx.GetData().(*JiraTaskData) + externalEpicKeys, err := GetEpicKeys(db, data) Review Comment: Are you saying have a Dal iterator that returns up to 100 rows at a time? I'll have to make a batched iterator version of it, because the existing one gives just 1 row at a time. Also, how will the urlTemplate look like? The jql is a query param, so I dont know what the template syntax is going to become like. I couldnt find existing examples of us doing something like this -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
