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 820843941 fix(domainlayer): change authored name email to author name
email (#4982)
820843941 is described below
commit 8208439410626f6c165c241643aad34ebd21c6fb
Author: Warren Chen <[email protected]>
AuthorDate: Thu Apr 20 16:03:59 2023 +0800
fix(domainlayer): change authored name email to author name email (#4982)
---
.../core/models/domainlayer/code/pull_request_commit.go | 10 +++++-----
.../20230419_add_commit_authored_date_in_pr_commits.go | 8 ++++----
.../_tool_bitbucket_pull_request_commits.csv | 2 +-
.../bitbucket/e2e/snapshot_tables/pull_request_commits.csv | 2 +-
.../migrationscripts/20230420_add_pr_commit_author_date.go | 6 +++---
backend/plugins/bitbucket/models/pr_commit.go | 14 +++++++-------
backend/plugins/bitbucket/tasks/pr_commit_convertor.go | 10 +++++-----
backend/plugins/bitbucket/tasks/pr_commit_extractor.go | 14 +++++++-------
backend/plugins/github/e2e/pr_commit_test.go | 8 ++++----
.../snapshot_tables/_tool_github_pull_request_commits.csv | 2 +-
.../github/e2e/snapshot_tables/pull_request_commits.csv | 2 +-
.../20230419_add_commit_authored_date_in_pr_commits.go | 6 +++---
backend/plugins/github/models/pr_commit.go | 12 ++++++------
backend/plugins/github/tasks/pr_commit_convertor.go | 10 +++++-----
backend/plugins/github/tasks/pr_commit_extractor.go | 12 ++++++------
backend/plugins/github_graphql/tasks/pr_collector.go | 12 ++++++------
.../gitlab/e2e/snapshot_tables/pull_request_commits.csv | 2 +-
backend/plugins/gitlab/tasks/mr_commit_convertor.go | 10 +++++-----
18 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/backend/core/models/domainlayer/code/pull_request_commit.go
b/backend/core/models/domainlayer/code/pull_request_commit.go
index 028c0e23a..af82d726d 100644
--- a/backend/core/models/domainlayer/code/pull_request_commit.go
+++ b/backend/core/models/domainlayer/code/pull_request_commit.go
@@ -24,11 +24,11 @@ import (
)
type PullRequestCommit struct {
- CommitSha string `gorm:"primaryKey;type:varchar(40)"`
- PullRequestId string `json:"id"
gorm:"primaryKey;type:varchar(255);comment:This key is generated based on
details from the original plugin"` // format: <Plugin>:<Entity>:<PK0>:<PK1>
- CommitAuthoredName string
- CommitAuthoredEmail string
- CommitAuthoredDate time.Time
+ CommitSha string `gorm:"primaryKey;type:varchar(40)"`
+ PullRequestId string `json:"id"
gorm:"primaryKey;type:varchar(255);comment:This key is generated based on
details from the original plugin"` // format: <Plugin>:<Entity>:<PK0>:<PK1>
+ CommitAuthorName string `gorm:"type:varchar(255)"`
+ CommitAuthorEmail string `gorm:"type:varchar(255)"`
+ CommitAuthoredDate time.Time
common.NoPKModel
}
diff --git
a/backend/core/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
b/backend/core/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
index eaa43cf84..7c4ac014b 100644
---
a/backend/core/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
+++
b/backend/core/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
@@ -29,9 +29,9 @@ import (
var _ plugin.MigrationScript = (*addCommitAuthoredDate)(nil)
type PullRequestCommit20230419 struct {
- CommitAuthoredName string
- CommitAuthoredEmail string
- CommitAuthoredDate time.Time
+ CommitAuthorName string `gorm:"type:varchar(255)"`
+ CommitAuthorEmail string `gorm:"type:varchar(255)"`
+ CommitAuthoredDate time.Time
}
func (PullRequestCommit20230419) TableName() string {
@@ -49,7 +49,7 @@ func (script *addCommitAuthoredDate) Up(basicRes
context.BasicRes) errors.Error
}
func (*addCommitAuthoredDate) Version() uint64 {
- return 20230419145127
+ return 20230419145129
}
func (*addCommitAuthoredDate) Name() string {
diff --git
a/backend/plugins/bitbucket/e2e/snapshot_tables/_tool_bitbucket_pull_request_commits.csv
b/backend/plugins/bitbucket/e2e/snapshot_tables/_tool_bitbucket_pull_request_commits.csv
index 94989f1b2..a1631744d 100644
---
a/backend/plugins/bitbucket/e2e/snapshot_tables/_tool_bitbucket_pull_request_commits.csv
+++
b/backend/plugins/bitbucket/e2e/snapshot_tables/_tool_bitbucket_pull_request_commits.csv
@@ -1,4 +1,4 @@
-connection_id,repo_id,pull_request_id,commit_sha,commit_authored_name,commit_authored_email,commit_authored_date
+connection_id,repo_id,pull_request_id,commit_sha,commit_author_name,commit_author_email,commit_authored_date
1,likyh/likyhphp,3,11115d276440bc1263c194fa164c061b91df9144,孙婉译,[email protected],2015-09-12T08:53:47.000+00:00
1,likyh/likyhphp,3,32ef6538e466e4e8b773b32c04ca983866eb51ca,linyh,[email protected],2015-08-09T09:07:00.000+00:00
1,likyh/likyhphp,3,3bf102513ac2949a1584b70b8649dfd7807332ec,al,[email protected],2015-08-09T08:59:59.000+00:00
diff --git
a/backend/plugins/bitbucket/e2e/snapshot_tables/pull_request_commits.csv
b/backend/plugins/bitbucket/e2e/snapshot_tables/pull_request_commits.csv
index c6da2235e..1b86414c7 100644
--- a/backend/plugins/bitbucket/e2e/snapshot_tables/pull_request_commits.csv
+++ b/backend/plugins/bitbucket/e2e/snapshot_tables/pull_request_commits.csv
@@ -1,4 +1,4 @@
-commit_sha,pull_request_id,commit_authored_name,commit_authored_email,commit_authored_date
+commit_sha,pull_request_id,commit_author_name,commit_author_email,commit_authored_date
11115d276440bc1263c194fa164c061b91df9144,bitbucket:BitbucketPullRequest:1:likyh/likyhphp:3,孙婉译,[email protected],2015-09-12T08:53:47.000+00:00
32ef6538e466e4e8b773b32c04ca983866eb51ca,bitbucket:BitbucketPullRequest:1:likyh/likyhphp:3,linyh,[email protected],2015-08-09T09:07:00.000+00:00
3bf102513ac2949a1584b70b8649dfd7807332ec,bitbucket:BitbucketPullRequest:1:likyh/likyhphp:3,al,[email protected],2015-08-09T08:59:59.000+00:00
diff --git
a/backend/plugins/bitbucket/models/migrationscripts/20230420_add_pr_commit_author_date.go
b/backend/plugins/bitbucket/models/migrationscripts/20230420_add_pr_commit_author_date.go
index 7f39fd1cd..155a2b254 100644
---
a/backend/plugins/bitbucket/models/migrationscripts/20230420_add_pr_commit_author_date.go
+++
b/backend/plugins/bitbucket/models/migrationscripts/20230420_add_pr_commit_author_date.go
@@ -29,9 +29,9 @@ import (
var _ plugin.MigrationScript = (*addBitbucketCommitAuthoredDate)(nil)
type BitbucketPrCommit20230420 struct {
- CommitAuthoredName string `gorm:"type:varchar(255)"`
- CommitAuthoredEmail string `gorm:"type:varchar(255)"`
- CommitAuthoredDate time.Time
+ CommitAuthorName string `gorm:"type:varchar(255)"`
+ CommitAuthorEmail string `gorm:"type:varchar(255)"`
+ CommitAuthoredDate time.Time
}
func (BitbucketPrCommit20230420) TableName() string {
diff --git a/backend/plugins/bitbucket/models/pr_commit.go
b/backend/plugins/bitbucket/models/pr_commit.go
index fc0f5e592..c14a779be 100644
--- a/backend/plugins/bitbucket/models/pr_commit.go
+++ b/backend/plugins/bitbucket/models/pr_commit.go
@@ -23,13 +23,13 @@ import (
)
type BitbucketPrCommit struct {
- ConnectionId uint64 `gorm:"primaryKey"`
- RepoId string `gorm:"primaryKey"` // PullRequestId is not
unique across multiple repos of a connection
- PullRequestId int `gorm:"primaryKey;autoIncrement:false"`
- CommitSha string `gorm:"primaryKey;type:varchar(40)"`
- CommitAuthoredName string
- CommitAuthoredEmail string
- CommitAuthoredDate time.Time
+ ConnectionId uint64 `gorm:"primaryKey"`
+ RepoId string `gorm:"primaryKey"` // PullRequestId is not
unique across multiple repos of a connection
+ PullRequestId int `gorm:"primaryKey;autoIncrement:false"`
+ CommitSha string `gorm:"primaryKey;type:varchar(40)"`
+ CommitAuthorName string
+ CommitAuthorEmail string
+ CommitAuthoredDate time.Time
common.NoPKModel
}
diff --git a/backend/plugins/bitbucket/tasks/pr_commit_convertor.go
b/backend/plugins/bitbucket/tasks/pr_commit_convertor.go
index 2112c1887..dd7d28aad 100644
--- a/backend/plugins/bitbucket/tasks/pr_commit_convertor.go
+++ b/backend/plugins/bitbucket/tasks/pr_commit_convertor.go
@@ -60,11 +60,11 @@ func ConvertPullRequestCommits(taskCtx
plugin.SubTaskContext) (err errors.Error)
Convert: func(inputRow interface{}) ([]interface{},
errors.Error) {
prCommit :=
inputRow.(*bitbucketModels.BitbucketPrCommit)
domainPrCommit := &code.PullRequestCommit{
- CommitSha: prCommit.CommitSha,
- PullRequestId:
pullIdGen.Generate(prCommit.ConnectionId, prCommit.RepoId,
prCommit.PullRequestId),
- CommitAuthoredEmail:
prCommit.CommitAuthoredEmail,
- CommitAuthoredName:
prCommit.CommitAuthoredName,
- CommitAuthoredDate:
prCommit.CommitAuthoredDate,
+ CommitSha: prCommit.CommitSha,
+ PullRequestId:
pullIdGen.Generate(prCommit.ConnectionId, prCommit.RepoId,
prCommit.PullRequestId),
+ CommitAuthorEmail: prCommit.CommitAuthorEmail,
+ CommitAuthorName: prCommit.CommitAuthorName,
+ CommitAuthoredDate: prCommit.CommitAuthoredDate,
}
return []interface{}{
domainPrCommit,
diff --git a/backend/plugins/bitbucket/tasks/pr_commit_extractor.go
b/backend/plugins/bitbucket/tasks/pr_commit_extractor.go
index 0f81a5e82..c8ca476a3 100644
--- a/backend/plugins/bitbucket/tasks/pr_commit_extractor.go
+++ b/backend/plugins/bitbucket/tasks/pr_commit_extractor.go
@@ -93,13 +93,13 @@ func ExtractApiPullRequestCommits(taskCtx
plugin.SubTaskContext) errors.Error {
authorEmail := strings.Trim(strings.Split(authorInfo,
"<")[1], ">")
bitbucketPullRequestCommit := &models.BitbucketPrCommit{
- ConnectionId: data.Options.ConnectionId,
- RepoId: repoId,
- PullRequestId: pull.BitbucketId,
- CommitSha: apiPullRequestCommit.Hash,
- CommitAuthoredName: authorName,
- CommitAuthoredEmail: authorEmail,
- CommitAuthoredDate: apiPullRequestCommit.Date,
+ ConnectionId: data.Options.ConnectionId,
+ RepoId: repoId,
+ PullRequestId: pull.BitbucketId,
+ CommitSha: apiPullRequestCommit.Hash,
+ CommitAuthorName: authorName,
+ CommitAuthorEmail: authorEmail,
+ CommitAuthoredDate: apiPullRequestCommit.Date,
}
if err != nil {
return nil, err
diff --git a/backend/plugins/github/e2e/pr_commit_test.go
b/backend/plugins/github/e2e/pr_commit_test.go
index 0a76a7942..55d14b77b 100644
--- a/backend/plugins/github/e2e/pr_commit_test.go
+++ b/backend/plugins/github/e2e/pr_commit_test.go
@@ -79,8 +79,8 @@ func TestPrCommitDataFlow(t *testing.T) {
"connection_id",
"commit_sha",
"pull_request_id",
- "commit_authored_name",
- "commit_authored_email",
+ "commit_author_name",
+ "commit_author_email",
"commit_authored_date",
"_raw_data_params",
"_raw_data_table",
@@ -98,8 +98,8 @@ func TestPrCommitDataFlow(t *testing.T) {
[]string{
"commit_sha",
"pull_request_id",
- "commit_authored_name",
- "commit_authored_email",
+ "commit_author_name",
+ "commit_author_email",
"commit_authored_date",
"_raw_data_params",
"_raw_data_table",
diff --git
a/backend/plugins/github/e2e/snapshot_tables/_tool_github_pull_request_commits.csv
b/backend/plugins/github/e2e/snapshot_tables/_tool_github_pull_request_commits.csv
index 7ce3d3c3f..7a50bc81d 100644
---
a/backend/plugins/github/e2e/snapshot_tables/_tool_github_pull_request_commits.csv
+++
b/backend/plugins/github/e2e/snapshot_tables/_tool_github_pull_request_commits.csv
@@ -1,4 +1,4 @@
-connection_id,commit_sha,pull_request_id,commit_authored_name,commit_authored_email,commit_authored_date,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
+connection_id,commit_sha,pull_request_id,commit_author_name,commit_author_email,commit_authored_date,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
1,00691c648a5b7d28dba5bcafa05d9bbccdf4d933,502102437,Lance,[email protected],2020-10-15T03:25:44.000+00:00,"{""ConnectionId"":1,""Name"":""panjf2000/ants""}",_raw_github_api_pull_request_commits,68,
1,013e846d496ecc5f61fb83fec3283f30fce18c30,696437287,exfly,[email protected],2021-07-25T04:02:27.000+00:00,"{""ConnectionId"":1,""Name"":""panjf2000/ants""}",_raw_github_api_pull_request_commits,79,
1,01cb40f8fb4dd5550cd274cfca16c8a874a21481,216254598,andy
pan,[email protected],2018-08-08T09:22:56.000+00:00,"{""ConnectionId"":1,""Name"":""panjf2000/ants""}",_raw_github_api_pull_request_commits,26,
diff --git
a/backend/plugins/github/e2e/snapshot_tables/pull_request_commits.csv
b/backend/plugins/github/e2e/snapshot_tables/pull_request_commits.csv
index 5bfb41b41..11aff267e 100644
--- a/backend/plugins/github/e2e/snapshot_tables/pull_request_commits.csv
+++ b/backend/plugins/github/e2e/snapshot_tables/pull_request_commits.csv
@@ -1,4 +1,4 @@
-commit_sha,pull_request_id,commit_authored_name,commit_authored_email,commit_authored_date,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
+commit_sha,pull_request_id,commit_author_name,commit_author_email,commit_authored_date,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
00691c648a5b7d28dba5bcafa05d9bbccdf4d933,github:GithubPullRequest:1:502102437,Lance,[email protected],2020-10-15T03:25:44.000+00:00,"{""ConnectionId"":1,""Name"":""panjf2000/ants""}",_raw_github_api_pull_request_commits,68,
013e846d496ecc5f61fb83fec3283f30fce18c30,github:GithubPullRequest:1:696437287,exfly,[email protected],2021-07-25T04:02:27.000+00:00,"{""ConnectionId"":1,""Name"":""panjf2000/ants""}",_raw_github_api_pull_request_commits,79,
01cb40f8fb4dd5550cd274cfca16c8a874a21481,github:GithubPullRequest:1:216254598,andy
pan,[email protected],2018-08-08T09:22:56.000+00:00,"{""ConnectionId"":1,""Name"":""panjf2000/ants""}",_raw_github_api_pull_request_commits,26,
diff --git
a/backend/plugins/github/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
b/backend/plugins/github/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
index cd9691f69..79ef18bd6 100644
---
a/backend/plugins/github/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
+++
b/backend/plugins/github/models/migrationscripts/20230419_add_commit_authored_date_in_pr_commits.go
@@ -29,9 +29,9 @@ import (
var _ plugin.MigrationScript = (*addGithubCommitAuthoredDate)(nil)
type GithubPrCommit20230419 struct {
- CommitAuthoredName string
- CommitAuthoredEmail string
- CommitAuthoredDate time.Time
+ CommitAuthorName string
+ CommitAuthorEmail string
+ CommitAuthoredDate time.Time
}
func (GithubPrCommit20230419) TableName() string {
diff --git a/backend/plugins/github/models/pr_commit.go
b/backend/plugins/github/models/pr_commit.go
index 27a26c626..6e8890094 100644
--- a/backend/plugins/github/models/pr_commit.go
+++ b/backend/plugins/github/models/pr_commit.go
@@ -24,12 +24,12 @@ import (
)
type GithubPrCommit struct {
- ConnectionId uint64 `gorm:"primaryKey"`
- CommitSha string `gorm:"primaryKey;type:varchar(40)"`
- PullRequestId int `gorm:"primaryKey;autoIncrement:false"`
- CommitAuthoredName string
- CommitAuthoredEmail string
- CommitAuthoredDate time.Time
+ ConnectionId uint64 `gorm:"primaryKey"`
+ CommitSha string `gorm:"primaryKey;type:varchar(40)"`
+ PullRequestId int `gorm:"primaryKey;autoIncrement:false"`
+ CommitAuthorName string
+ CommitAuthorEmail string
+ CommitAuthoredDate time.Time
common.NoPKModel
}
diff --git a/backend/plugins/github/tasks/pr_commit_convertor.go
b/backend/plugins/github/tasks/pr_commit_convertor.go
index a66225286..267d343e7 100644
--- a/backend/plugins/github/tasks/pr_commit_convertor.go
+++ b/backend/plugins/github/tasks/pr_commit_convertor.go
@@ -69,11 +69,11 @@ func ConvertPullRequestCommits(taskCtx
plugin.SubTaskContext) (err errors.Error)
Convert: func(inputRow interface{}) ([]interface{},
errors.Error) {
githubPullRequestCommit :=
inputRow.(*models.GithubPrCommit)
domainPrCommit := &code.PullRequestCommit{
- CommitSha:
githubPullRequestCommit.CommitSha,
- PullRequestId:
pullIdGen.Generate(data.Options.ConnectionId,
githubPullRequestCommit.PullRequestId),
- CommitAuthoredName:
githubPullRequestCommit.CommitAuthoredName,
- CommitAuthoredEmail:
githubPullRequestCommit.CommitAuthoredEmail,
- CommitAuthoredDate:
githubPullRequestCommit.CommitAuthoredDate,
+ CommitSha:
githubPullRequestCommit.CommitSha,
+ PullRequestId:
pullIdGen.Generate(data.Options.ConnectionId,
githubPullRequestCommit.PullRequestId),
+ CommitAuthorName:
githubPullRequestCommit.CommitAuthorName,
+ CommitAuthorEmail:
githubPullRequestCommit.CommitAuthorEmail,
+ CommitAuthoredDate:
githubPullRequestCommit.CommitAuthoredDate,
}
return []interface{}{
domainPrCommit,
diff --git a/backend/plugins/github/tasks/pr_commit_extractor.go
b/backend/plugins/github/tasks/pr_commit_extractor.go
index 5f098d0b8..8418bbc8e 100644
--- a/backend/plugins/github/tasks/pr_commit_extractor.go
+++ b/backend/plugins/github/tasks/pr_commit_extractor.go
@@ -106,12 +106,12 @@ func ExtractApiPullRequestCommits(taskCtx
plugin.SubTaskContext) errors.Error {
results = append(results, githubCommit)
githubPullRequestCommit := &models.GithubPrCommit{
- ConnectionId: data.Options.ConnectionId,
- CommitSha: apiPullRequestCommit.Sha,
- PullRequestId: pull.GithubId,
- CommitAuthoredName: githubCommit.AuthorName,
- CommitAuthoredEmail: githubCommit.AuthorEmail,
- CommitAuthoredDate: githubCommit.AuthoredDate,
+ ConnectionId: data.Options.ConnectionId,
+ CommitSha: apiPullRequestCommit.Sha,
+ PullRequestId: pull.GithubId,
+ CommitAuthorName: githubCommit.AuthorName,
+ CommitAuthorEmail: githubCommit.AuthorEmail,
+ CommitAuthoredDate: githubCommit.AuthoredDate,
}
if err != nil {
return nil, err
diff --git a/backend/plugins/github_graphql/tasks/pr_collector.go
b/backend/plugins/github_graphql/tasks/pr_collector.go
index 207e6fd26..825ff6ae9 100644
--- a/backend/plugins/github_graphql/tasks/pr_collector.go
+++ b/backend/plugins/github_graphql/tasks/pr_collector.go
@@ -279,12 +279,12 @@ func CollectPr(taskCtx plugin.SubTaskContext)
errors.Error {
results = append(results, githubCommit)
githubPullRequestCommit :=
&models.GithubPrCommit{
- ConnectionId:
data.Options.ConnectionId,
- CommitSha:
apiPullRequestCommit.Commit.Oid,
- PullRequestId:
githubPr.GithubId,
- CommitAuthoredName:
githubCommit.AuthorName,
- CommitAuthoredEmail:
githubCommit.AuthorEmail,
- CommitAuthoredDate:
githubCommit.AuthoredDate,
+ ConnectionId:
data.Options.ConnectionId,
+ CommitSha:
apiPullRequestCommit.Commit.Oid,
+ PullRequestId:
githubPr.GithubId,
+ CommitAuthorName:
githubCommit.AuthorName,
+ CommitAuthorEmail:
githubCommit.AuthorEmail,
+ CommitAuthoredDate:
githubCommit.AuthoredDate,
}
if err != nil {
return nil, err
diff --git
a/backend/plugins/gitlab/e2e/snapshot_tables/pull_request_commits.csv
b/backend/plugins/gitlab/e2e/snapshot_tables/pull_request_commits.csv
index b8b4c28ee..ee523d8eb 100644
--- a/backend/plugins/gitlab/e2e/snapshot_tables/pull_request_commits.csv
+++ b/backend/plugins/gitlab/e2e/snapshot_tables/pull_request_commits.csv
@@ -1,4 +1,4 @@
-commit_sha,pull_request_id,commit_authored_name,commit_authored_email,commit_authored_date,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
+commit_sha,pull_request_id,commit_author_name,commit_author_email,commit_authored_date,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
05976c113b02fb71d5c43682bd2f9d96a3454efa,gitlab:GitlabMergeRequest:1:53445063,Nehil
Jain,[email protected],2020-03-24T18:14:03.000+00:00,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_commits,34,
083864201849f6707a34d24e61c43638696f95a6,gitlab:GitlabMergeRequest:1:35064956,Martin
Guindon,[email protected],2019-08-15T19:32:19.000+00:00,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_commits,6,
08973065d33c6fd2fb1f592b7a1e0fbe2ee72edd,gitlab:GitlabMergeRequest:1:34300715,Taylor
A.
Murphy,[email protected],2019-08-02T18:35:08.000+00:00,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_commits,11,
diff --git a/backend/plugins/gitlab/tasks/mr_commit_convertor.go
b/backend/plugins/gitlab/tasks/mr_commit_convertor.go
index 622bfb5f4..99b2a2b41 100644
--- a/backend/plugins/gitlab/tasks/mr_commit_convertor.go
+++ b/backend/plugins/gitlab/tasks/mr_commit_convertor.go
@@ -67,11 +67,11 @@ func ConvertApiMergeRequestsCommits(taskCtx
plugin.SubTaskContext) errors.Error
Convert: func(inputRow interface{}) ([]interface{},
errors.Error) {
GitlabMrCommit := inputRow.(*models.GitlabMrCommit)
domainPrcommit := &code.PullRequestCommit{
- CommitSha: GitlabMrCommit.CommitSha,
- PullRequestId:
domainIdGenerator.Generate(data.Options.ConnectionId,
GitlabMrCommit.MergeRequestId),
- CommitAuthoredName:
GitlabMrCommit.CommitAuthorName,
- CommitAuthoredEmail:
GitlabMrCommit.CommitAuthorEmail,
- CommitAuthoredDate:
*GitlabMrCommit.CommitAuthoredDate,
+ CommitSha: GitlabMrCommit.CommitSha,
+ PullRequestId:
domainIdGenerator.Generate(data.Options.ConnectionId,
GitlabMrCommit.MergeRequestId),
+ CommitAuthorName:
GitlabMrCommit.CommitAuthorName,
+ CommitAuthorEmail:
GitlabMrCommit.CommitAuthorEmail,
+ CommitAuthoredDate:
*GitlabMrCommit.CommitAuthoredDate,
}
return []interface{}{
domainPrcommit,