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 2bfc2942 fix: accounts miss full_name from gitlab plugin
2bfc2942 is described below
commit 2bfc294209b5aaf30b2a73cbf35ee087a38460a4
Author: abeizn <[email protected]>
AuthorDate: Thu Jul 21 17:47:27 2022 +0800
fix: accounts miss full_name from gitlab plugin
---
plugins/gitlab/e2e/snapshot_tables/accounts.csv | 12 ++++++------
plugins/gitlab/tasks/account_convertor.go | 3 ++-
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/plugins/gitlab/e2e/snapshot_tables/accounts.csv
b/plugins/gitlab/e2e/snapshot_tables/accounts.csv
index 75a60fa4..782c43e5 100644
--- a/plugins/gitlab/e2e/snapshot_tables/accounts.csv
+++ b/plugins/gitlab/e2e/snapshot_tables/accounts.csv
@@ -1,7 +1,7 @@
id,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark,email,full_name,user_name,avatar_url,organization,created_date,status
-gitlab:GitlabAccount:1:1533989,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,6,,,,abcxx5,https://gitlab.com/uploads/-/system/user/avatar/1533989/avatar.png,,,0
-gitlab:GitlabAccount:1:2436773,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,1,,,,Jabc,https://gitlab.com/uploads/-/system/user/avatar/2436773/avatar.png,,,0
-gitlab:GitlabAccount:1:2994198,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,2,,,,abcxx1,https://secure.gravatar.com/avatar/69667c2c63ce892e11b9ac098e3abc4f?s=80&d=identicon,,,0
-gitlab:GitlabAccount:1:4403812,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,5,,,,abcxx4,https://gitlab.com/uploads/-/system/user/avatar/4403812/avatar.png,,,0
-gitlab:GitlabAccount:1:4646117,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,4,,,,abcxx3,https://secure.gravatar.com/avatar/85998e06af031ec6071c64976018bcb2?s=80&d=identicon,,,0
-gitlab:GitlabAccount:1:5767011,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,3,,,,abcxx2,https://secure.gravatar.com/avatar/ce5efe9b3acceecd4f3266fad757e6c3?s=80&d=identicon,,,0
+gitlab:GitlabAccount:1:1533989,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,6,,,abcxx5,abc6,https://gitlab.com/uploads/-/system/user/avatar/1533989/avatar.png,,,0
+gitlab:GitlabAccount:1:2436773,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,1,,,Jabc,abc1,https://gitlab.com/uploads/-/system/user/avatar/2436773/avatar.png,,,0
+gitlab:GitlabAccount:1:2994198,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,2,,,abcxx1,abc2,https://secure.gravatar.com/avatar/69667c2c63ce892e11b9ac098e3abc4f?s=80&d=identicon,,,0
+gitlab:GitlabAccount:1:4403812,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,5,,,abcxx4,abc5,https://gitlab.com/uploads/-/system/user/avatar/4403812/avatar.png,,,0
+gitlab:GitlabAccount:1:4646117,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,4,,,abcxx3,abc4,https://secure.gravatar.com/avatar/85998e06af031ec6071c64976018bcb2?s=80&d=identicon,,,0
+gitlab:GitlabAccount:1:5767011,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_users,3,,,abcxx2,abc3,https://secure.gravatar.com/avatar/ce5efe9b3acceecd4f3266fad757e6c3?s=80&d=identicon,,,0
diff --git a/plugins/gitlab/tasks/account_convertor.go
b/plugins/gitlab/tasks/account_convertor.go
index 445e38d1..5f3ff4d8 100644
--- a/plugins/gitlab/tasks/account_convertor.go
+++ b/plugins/gitlab/tasks/account_convertor.go
@@ -63,7 +63,8 @@ func ConvertAccounts(taskCtx core.SubTaskContext) error {
GitlabAccount := inputRow.(*gitlabModels.GitlabAccount)
domainUser := &crossdomain.Account{
DomainEntity: domainlayer.DomainEntity{Id:
accountIdGen.Generate(data.Options.ConnectionId, GitlabAccount.GitlabId)},
- UserName: GitlabAccount.Name,
+ UserName: GitlabAccount.Username,
+ FullName: GitlabAccount.Name,
Email: GitlabAccount.Email,
AvatarUrl: GitlabAccount.AvatarUrl,
}