This is an automated email from the ASF dual-hosted git repository.
klesh 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 7e0a4a7d Generate domain repoId, authorId, committerId through
connectionId (#2354)
7e0a4a7d is described below
commit 7e0a4a7dfb041e09b85835ed29ad9f85498c6daa
Author: Mr.An <[email protected]>
AuthorDate: Mon Jun 27 14:43:15 2022 +0800
Generate domain repoId, authorId, committerId through connectionId (#2354)
Co-authored-by: Klesh Wong <[email protected]>
---
plugins/github/tasks/commit_convertor.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/github/tasks/commit_convertor.go
b/plugins/github/tasks/commit_convertor.go
index a7aae72c..55df93c7 100644
--- a/plugins/github/tasks/commit_convertor.go
+++ b/plugins/github/tasks/commit_convertor.go
@@ -56,7 +56,7 @@ func ConvertCommits(taskCtx core.SubTaskContext) error {
defer cursor.Close()
repoDidGen := didgen.NewDomainIdGenerator(&githubModels.GithubRepo{})
- domainRepoId := repoDidGen.Generate(repoId)
+ domainRepoId := repoDidGen.Generate(data.Options.ConnectionId, repoId)
userDidGen := didgen.NewDomainIdGenerator(&githubModels.GithubUser{})
converter, err := helper.NewDataConverter(helper.DataConverterArgs{
@@ -79,14 +79,14 @@ func ConvertCommits(taskCtx core.SubTaskContext) error {
Message: githubCommit.Message,
Additions: githubCommit.Additions,
Deletions: githubCommit.Deletions,
- AuthorId:
userDidGen.Generate(githubCommit.AuthorId),
+ AuthorId:
userDidGen.Generate(data.Options.ConnectionId, githubCommit.AuthorId),
AuthorName: githubCommit.AuthorName,
AuthorEmail: githubCommit.AuthorEmail,
AuthoredDate: githubCommit.AuthoredDate,
CommitterName: githubCommit.CommitterName,
CommitterEmail: githubCommit.CommitterEmail,
CommittedDate: githubCommit.CommittedDate,
- CommitterId:
userDidGen.Generate(githubCommit.CommitterId),
+ CommitterId:
userDidGen.Generate(data.Options.ConnectionId, githubCommit.CommitterId),
}
repoCommit := &code.RepoCommit{
RepoId: domainRepoId,