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/09/16 11:49:05 UTC

[incubator-devlake] 04/05: fix(gitlab): use didgen instead of fmt

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 a19aaf2f1c4197fe878975e666874803a05cfe5f
Author: Yingchu Chen <yi...@merico.dev>
AuthorDate: Fri Sep 16 19:20:32 2022 +0800

    fix(gitlab): use didgen instead of fmt
---
 plugins/gitlab/tasks/pipeline_convertor.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/gitlab/tasks/pipeline_convertor.go b/plugins/gitlab/tasks/pipeline_convertor.go
index 47c8c89f..57474915 100644
--- a/plugins/gitlab/tasks/pipeline_convertor.go
+++ b/plugins/gitlab/tasks/pipeline_convertor.go
@@ -50,6 +50,7 @@ func ConvertPipelines(taskCtx core.SubTaskContext) errors.Error {
 	defer cursor.Close()
 
 	pipelineIdGen := didgen.NewDomainIdGenerator(&gitlabModels.GitlabPipeline{})
+	projectIdGen := didgen.NewDomainIdGenerator(&gitlabModels.GitlabProject{})
 
 	converter, err := helper.NewDataConverter(helper.DataConverterArgs{
 		InputRowType: reflect.TypeOf(gitlabModels.GitlabPipeline{}),
@@ -74,7 +75,7 @@ func ConvertPipelines(taskCtx core.SubTaskContext) errors.Error {
 				DomainEntity: domainlayer.DomainEntity{
 					Id: pipelineIdGen.Generate(data.Options.ConnectionId, gitlabPipeline.GitlabId),
 				},
-				Name: didgen.NewDomainIdGenerator(&gitlabModels.GitlabProject{}).
+				Name: projectIdGen.
 					Generate(data.Options.ConnectionId, gitlabPipeline.ProjectId),
 				Result: devops.GetResult(&devops.ResultRule{
 					Failed:  []string{"failed"},