You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/06/29 04:15:23 UTC

[incubator-devlake] branch main updated (1b71be00 -> bcb5680d)

This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


    from 1b71be00 fix: steps total nums is wrong (#2369)
     new 13af4406 fix: ae miss connection id
     new bcb5680d fix: ae miss connection id

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 plugins/ae/api/connection.go          | 15 ---------------
 plugins/{feishu => ae}/api/init.go    |  0
 plugins/ae/tasks/commits_collector.go |  3 ++-
 3 files changed, 2 insertions(+), 16 deletions(-)
 copy plugins/{feishu => ae}/api/init.go (100%)


[incubator-devlake] 02/02: fix: ae miss connection id

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit bcb5680d2f26f58036f68c41ece6e6f09421c6c2
Author: abeizn <zi...@merico.dev>
AuthorDate: Wed Jun 29 12:08:24 2022 +0800

    fix: ae miss connection id
---
 plugins/ae/tasks/commits_collector.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/ae/tasks/commits_collector.go b/plugins/ae/tasks/commits_collector.go
index 2786a3ac..a1b598cf 100644
--- a/plugins/ae/tasks/commits_collector.go
+++ b/plugins/ae/tasks/commits_collector.go
@@ -37,7 +37,7 @@ func CollectCommits(taskCtx core.SubTaskContext) error {
 			Ctx: taskCtx,
 			Params: AeApiParams{
 				ConnectionId: data.Options.ConnectionId,
-				ProjectId: data.Options.ProjectId,
+				ProjectId:    data.Options.ProjectId,
 			},
 			Table: RAW_COMMITS_TABLE,
 		},


[incubator-devlake] 01/02: fix: ae miss connection id

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 13af44060c0dd5302c024985a860d831e642a132
Author: abeizn <zi...@merico.dev>
AuthorDate: Wed Jun 29 12:01:39 2022 +0800

    fix: ae miss connection id
---
 plugins/ae/api/connection.go          | 15 --------------
 plugins/ae/api/init.go                | 39 +++++++++++++++++++++++++++++++++++
 plugins/ae/tasks/commits_collector.go |  1 +
 3 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/plugins/ae/api/connection.go b/plugins/ae/api/connection.go
index 9dc2119b..b84f7998 100644
--- a/plugins/ae/api/connection.go
+++ b/plugins/ae/api/connection.go
@@ -25,28 +25,13 @@ import (
 	"github.com/apache/incubator-devlake/plugins/ae/models"
 	"github.com/apache/incubator-devlake/plugins/core"
 	"github.com/apache/incubator-devlake/plugins/helper"
-	"github.com/go-playground/validator/v10"
 	"github.com/mitchellh/mapstructure"
-	"github.com/spf13/viper"
-	"gorm.io/gorm"
 )
 
 type ApiMeResponse struct {
 	Name string `json:"name"`
 }
 
-var vld *validator.Validate
-var connectionHelper *helper.ConnectionApiHelper
-
-func Init(config *viper.Viper, logger core.Logger, database *gorm.DB) {
-	basicRes := helper.NewDefaultBasicRes(config, logger, database)
-	vld = validator.New()
-	connectionHelper = helper.NewConnectionHelper(
-		basicRes,
-		vld,
-	)
-}
-
 /*
 GET /plugins/ae/test/
 */
diff --git a/plugins/ae/api/init.go b/plugins/ae/api/init.go
new file mode 100644
index 00000000..6774e148
--- /dev/null
+++ b/plugins/ae/api/init.go
@@ -0,0 +1,39 @@
+/*
+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/plugins/core"
+	"github.com/apache/incubator-devlake/plugins/helper"
+	"github.com/go-playground/validator/v10"
+	"github.com/spf13/viper"
+	"gorm.io/gorm"
+)
+
+var vld *validator.Validate
+var connectionHelper *helper.ConnectionApiHelper
+var basicRes core.BasicRes
+
+func Init(config *viper.Viper, logger core.Logger, database *gorm.DB) {
+	basicRes = helper.NewDefaultBasicRes(config, logger, database)
+	vld = validator.New()
+	connectionHelper = helper.NewConnectionHelper(
+		basicRes,
+		vld,
+	)
+}
diff --git a/plugins/ae/tasks/commits_collector.go b/plugins/ae/tasks/commits_collector.go
index 0864e2bb..2786a3ac 100644
--- a/plugins/ae/tasks/commits_collector.go
+++ b/plugins/ae/tasks/commits_collector.go
@@ -36,6 +36,7 @@ func CollectCommits(taskCtx core.SubTaskContext) error {
 		RawDataSubTaskArgs: helper.RawDataSubTaskArgs{
 			Ctx: taskCtx,
 			Params: AeApiParams{
+				ConnectionId: data.Options.ConnectionId,
 				ProjectId: data.Options.ProjectId,
 			},
 			Table: RAW_COMMITS_TABLE,