klesh commented on code in PR #2061: URL: https://github.com/apache/incubator-devlake/pull/2061#discussion_r889987258
########## plugins/refdiff/README.md: ########## @@ -51,17 +131,16 @@ curl -v -XPOST http://localhost:8080/pipelines --data @- <<'JSON' { "newRef": "refs/tags/v0.6.0", "oldRef": "refs/tags/0.5.0" }, { "newRef": "refs/tags/0.5.0", "oldRef": "refs/tags/0.4.0" } ], - "tasks": [ + "subtasks": [ Review Comment: Wrong place, one level up pls ########## models/migrationscripts/updateSchemas20220601.go: ########## @@ -0,0 +1,79 @@ +/* +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 migrationscripts + +import ( + "context" + "time" + + "github.com/apache/incubator-devlake/models/common" + "gorm.io/datatypes" + "gorm.io/gorm" +) + +type TaskProgressDetail struct { Review Comment: we dont need this, since it was ignored by `gorm` anyway ########## models/migrationscripts/updateSchemas20220601.go: ########## @@ -0,0 +1,79 @@ +/* +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 migrationscripts + +import ( + "context" + "time" + + "github.com/apache/incubator-devlake/models/common" + "gorm.io/datatypes" + "gorm.io/gorm" +) + +type TaskProgressDetail struct { + TotalSubTasks int `json:"totalSubTasks"` + FinishedSubTasks int `json:"finishedSubTasks"` + TotalRecords int `json:"totalRecords"` + FinishedRecords int `json:"finishedRecords"` + SubTaskName string `json:"subTaskName"` + SubTaskNumber int `json:"subTaskNumber"` +} + +type Task20220601 struct { + common.Model + Plugin string `json:"plugin" gorm:"index"` + Subtasks datatypes.JSON `json:"subtasks"` + Options datatypes.JSON `json:"options"` + Status string `json:"status"` + Message string `json:"message"` + Progress float32 `json:"progress"` + ProgressDetail *TaskProgressDetail `json:"progressDetail" gorm:"-"` Review Comment: i think we could remove this line -- 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]
