antoniomuso commented on code in PR #6424:
URL:
https://github.com/apache/incubator-devlake/pull/6424#discussion_r1448531887
##########
backend/plugins/gitlab/tasks/account_extractor.go:
##########
@@ -52,16 +56,34 @@ func ExtractAccounts(taskCtx plugin.SubTaskContext)
errors.Error {
}
results := make([]interface{}, 0)
- GitlabAccount := &models.GitlabAccount{
- ConnectionId: data.Options.ConnectionId,
- GitlabId: userRes.GitlabId,
- Username: userRes.Username,
- Name: userRes.Name,
- State: userRes.State,
- MembershipState: userRes.MembershipState,
- AvatarUrl: userRes.AvatarUrl,
- WebUrl: userRes.WebUrl,
+ var GitlabAccount *models.GitlabAccount
+ if skipCreatedUserAt {
+ GitlabAccount = &models.GitlabAccount{
+ ConnectionId:
data.Options.ConnectionId,
+ GitlabId: userRes.GitlabId,
+ Username: userRes.Username,
+ Name: userRes.Name,
+ State: userRes.State,
+ MembershipState:
userRes.MembershipState,
+ AvatarUrl: userRes.AvatarUrl,
+ WebUrl: userRes.WebUrl,
+ Email: userRes.Email,
+ }
+ } else {
+ GitlabAccount = &models.GitlabAccount{
+ ConnectionId:
data.Options.ConnectionId,
+ GitlabId: userRes.GitlabId,
+ Username: userRes.Username,
+ Name: userRes.Name,
+ State: userRes.State,
+ MembershipState:
userRes.MembershipState,
+ AvatarUrl: userRes.AvatarUrl,
+ WebUrl: userRes.WebUrl,
+ Email: userRes.Email,
+ CreatedUserAt: userRes.CreatedUserAt,
Review Comment:
No, it's not nil. The problem is that the API returns a value different from
the right one. For this reason, I need to skip that value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]