ViktorGrigorov7 commented on code in PR #6689: URL: https://github.com/apache/incubator-devlake/pull/6689#discussion_r1439223995
########## backend/plugins/bitbucket_server/api/init.go: ########## @@ -0,0 +1,69 @@ +/* +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 api + +import ( + "github.com/apache/incubator-devlake/core/context" + "github.com/apache/incubator-devlake/core/plugin" + "github.com/apache/incubator-devlake/helpers/pluginhelper/api" + "github.com/apache/incubator-devlake/plugins/bitbucket_server/models" + "github.com/go-playground/validator/v10" +) + +var vld *validator.Validate Review Comment: Hey, @klesh. I reviewed the api.DsHelper. From what I saw it makes the code cleaner in init.go but it complicates the code in other parts. For example, to retrieve a repo, even in the GitHub plugin, we have to make the database query (https://github.com/apache/incubator-devlake/blob/b6c9e6cf6aa4a0e07443c6f98eea2e7adf528e41/backend/plugins/github/api/blueprint_v200.go#L86). At least that's from my first look. Perhaps I don't understand it well enough. I'll look at it in a bit more depth. Help in any way would be appreciated :) -- 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]
