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


The following commit(s) were added to refs/heads/main by this push:
     new 75601693f fix: github repo id (#6369)
75601693f is described below

commit 75601693f7268941297151ffe42efc431cc25674
Author: abeizn <[email protected]>
AuthorDate: Tue Oct 31 03:12:11 2023 -0500

    fix: github repo id (#6369)
    
    * fix: github repo id
    
    * fix: gitlab repo id
---
 backend/plugins/github_graphql/tasks/deployment_convertor.go | 3 +--
 backend/plugins/gitlab/tasks/deployment_convertor.go         | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/backend/plugins/github_graphql/tasks/deployment_convertor.go 
b/backend/plugins/github_graphql/tasks/deployment_convertor.go
index 60479dc90..051d08ac3 100644
--- a/backend/plugins/github_graphql/tasks/deployment_convertor.go
+++ b/backend/plugins/github_graphql/tasks/deployment_convertor.go
@@ -18,7 +18,6 @@ limitations under the License.
 package tasks
 
 import (
-       "fmt"
        "reflect"
 
        "github.com/apache/incubator-devlake/core/dal"
@@ -89,7 +88,7 @@ func ConvertDeployment(taskCtx plugin.SubTaskContext) 
errors.Error {
                                FinishedDate: &githubDeployment.UpdatedDate, // 
fixme there is no such field
                                CommitSha:    githubDeployment.CommitOid,
                                RefName:      githubDeployment.RefName,
-                               RepoId:       fmt.Sprintf("%d", 
githubDeployment.GithubId),
+                               RepoId:       
deploymentScopeIdGen.Generate(githubDeployment.ConnectionId, 
githubDeployment.GithubId),
                                RepoUrl:      githubDeployment.RepositoryUrl,
                        }
 
diff --git a/backend/plugins/gitlab/tasks/deployment_convertor.go 
b/backend/plugins/gitlab/tasks/deployment_convertor.go
index e1f9b87df..7022b52ae 100644
--- a/backend/plugins/gitlab/tasks/deployment_convertor.go
+++ b/backend/plugins/gitlab/tasks/deployment_convertor.go
@@ -113,7 +113,7 @@ func ConvertDeployment(taskCtx plugin.SubTaskContext) 
errors.Error {
                                FinishedDate: 
gitlabDeployment.DeployableFinishedAt,
                                CommitSha:    gitlabDeployment.Sha,
                                RefName:      gitlabDeployment.Ref,
-                               RepoId:       
didgen.NewDomainIdGenerator(&models.GitlabProject{}).Generate(data.Options.ConnectionId,
 data.Options.ProjectId),
+                               RepoId:       
projectIdGen.Generate(data.Options.ConnectionId, data.Options.ProjectId),
                                RepoUrl:      repo.WebUrl,
                        }
                        if duration != nil {

Reply via email to