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 2023/05/18 13:04:04 UTC

[incubator-devlake] branch release-v0.17 updated: fix: gitHub repos' url columns are empty (#5228)

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

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


The following commit(s) were added to refs/heads/release-v0.17 by this push:
     new 55b08c546 fix: gitHub repos' url columns are empty (#5228)
55b08c546 is described below

commit 55b08c54629425cd3bf653f2d142383a66b6845c
Author: abeizn <zi...@merico.dev>
AuthorDate: Thu May 18 18:13:17 2023 +0800

    fix: gitHub repos' url columns are empty (#5228)
---
 backend/plugins/github/tasks/repo_convertor.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/backend/plugins/github/tasks/repo_convertor.go b/backend/plugins/github/tasks/repo_convertor.go
index f6349030b..c25e16519 100644
--- a/backend/plugins/github/tasks/repo_convertor.go
+++ b/backend/plugins/github/tasks/repo_convertor.go
@@ -19,6 +19,8 @@ package tasks
 
 import (
 	"fmt"
+	"reflect"
+
 	"github.com/apache/incubator-devlake/core/dal"
 	"github.com/apache/incubator-devlake/core/errors"
 	"github.com/apache/incubator-devlake/core/models/domainlayer"
@@ -30,7 +32,6 @@ import (
 	"github.com/apache/incubator-devlake/core/plugin"
 	"github.com/apache/incubator-devlake/helpers/pluginhelper/api"
 	"github.com/apache/incubator-devlake/plugins/github/models"
-	"reflect"
 )
 
 const RAW_REPOSITORIES_TABLE = "github_api_repositories"
@@ -66,7 +67,7 @@ func ConvertRepo(taskCtx plugin.SubTaskContext) errors.Error {
 
 	cursor, err := db.Cursor(
 		dal.From(&models.GithubRepo{}),
-		dal.Where("github_id = ?", repoId),
+		dal.Where("github_id = ? and connection_id = ?", repoId, data.Options.ConnectionId),
 	)
 	if err != nil {
 		return err