From 893de4f5c0e852fac9a73e0c0243bc038af75f17 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 25 Feb 2020 21:35:57 +0100 Subject: identity: bring back the login to hold that info from bridges (purely informational) --- bridge/github/import.go | 2 ++ bridge/gitlab/import.go | 1 + bridge/jira/import.go | 3 ++- bridge/launchpad/import.go | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) (limited to 'bridge') diff --git a/bridge/github/import.go b/bridge/github/import.go index 7aec809f..a74c49c5 100644 --- a/bridge/github/import.go +++ b/bridge/github/import.go @@ -546,6 +546,7 @@ func (gi *githubImporter) ensurePerson(repo *cache.RepoCache, actor *actor) (*ca i, err = repo.NewIdentityRaw( name, email, + string(actor.Login), string(actor.AvatarUrl), map[string]string{ metaKeyGithubLogin: string(actor.Login), @@ -592,6 +593,7 @@ func (gi *githubImporter) getGhost(repo *cache.RepoCache) (*cache.IdentityCache, return repo.NewIdentityRaw( name, "", + string(q.User.Login), string(q.User.AvatarUrl), map[string]string{ metaKeyGithubLogin: string(q.User.Login), diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go index 9ebb0d88..5ed5f0e3 100644 --- a/bridge/gitlab/import.go +++ b/bridge/gitlab/import.go @@ -394,6 +394,7 @@ func (gi *gitlabImporter) ensurePerson(repo *cache.RepoCache, id int) (*cache.Id i, err = repo.NewIdentityRaw( user.Name, user.PublicEmail, + user.Username, user.AvatarURL, map[string]string{ // because Gitlab diff --git a/bridge/jira/import.go b/bridge/jira/import.go index 21305bd5..3d6d5414 100644 --- a/bridge/jira/import.go +++ b/bridge/jira/import.go @@ -194,9 +194,10 @@ func (ji *jiraImporter) ensurePerson(repo *cache.RepoCache, user User) (*cache.I i, err = repo.NewIdentityRaw( user.DisplayName, user.EmailAddress, + user.Key, "", map[string]string{ - metaKeyJiraUser: string(user.Key), + metaKeyJiraUser: user.Key, }, ) diff --git a/bridge/launchpad/import.go b/bridge/launchpad/import.go index dfcbb95e..3b6d7fe0 100644 --- a/bridge/launchpad/import.go +++ b/bridge/launchpad/import.go @@ -33,6 +33,7 @@ func (li *launchpadImporter) ensurePerson(repo *cache.RepoCache, owner LPPerson) return repo.NewIdentityRaw( owner.Name, "", + owner.Login, "", map[string]string{ metaKeyLaunchpadLogin: owner.Login, -- cgit