klesh commented on code in PR #5604:
URL:
https://github.com/apache/incubator-devlake/pull/5604#discussion_r1247286126
##########
backend/helpers/e2ehelper/data_flow_tester.go:
##########
@@ -50,6 +50,10 @@ import (
"gorm.io/gorm/schema"
)
+func init() {
+ _ = os.Setenv("TZ", "UTC") // Normalizes time across test app locale
and expected data
Review Comment:
No, don't force the TZ, use Environment Variable when needed
##########
backend/plugins/zentao/api/project_scope.go:
##########
@@ -0,0 +1,107 @@
+/*
+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/errors"
+ "github.com/apache/incubator-devlake/core/plugin"
+ "github.com/apache/incubator-devlake/helpers/pluginhelper/api"
+ "github.com/apache/incubator-devlake/plugins/zentao/models"
+)
+
+type ProjectScopeRes struct {
+ models.ZentaoProject
+ api.ScopeResDoc[models.ZentaoScopeConfig]
+}
+
+type ProjectScopeReq api.ScopeReq[models.ZentaoProject]
+
+// PutProjectScope create or update zentao projects
+// @Summary create or update zentao projects
+// @Description Create or update zentao projects
+// @Tags plugins/zentao
+// @Accept application/json
+// @Param connectionId path int true "connection ID"
+// @Param scope body ProjectScopeReq true "json"
+// @Success 200 {object} []models.ZentaoProject
+// @Failure 400 {object} shared.ApiBody "Bad Request"
+// @Failure 500 {object} shared.ApiBody "Internal Error"
+// @Router /plugins/zentao/connections/{connectionId}/project/scopes [PUT]
+func PutProjectScope(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutput, errors.Error) {
+ return projectScopeHelper.Put(input)
+}
+
+// UpdateProjectScope patch to zentao project
+// @Summary patch to zentao project
+// @Description patch to zentao project
+// @Tags plugins/zentao
+// @Accept application/json
+// @Param connectionId path int true "connection ID"
+// @Param scopeId path int true "scope ID"
+// @Param scope body models.ZentaoProject true "json"
+// @Success 200 {object} models.ZentaoProject
+// @Failure 400 {object} shared.ApiBody "Bad Request"
+// @Failure 500 {object} shared.ApiBody "Internal Error"
+// @Router /plugins/zentao/connections/{connectionId}/scopes/project/{scopeId}
[PATCH]
Review Comment:
the `projects` need to be removed from all routes
--
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]