Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-10-03 19:53:11 +0300
committerDouwe Maan <douwe@gitlab.com>2017-10-03 19:53:11 +0300
commitbfd53aa6d087448548c60ec834b7a41dc87ca1e9 (patch)
treef6cf6b78541efe52423084370bb4bf6c731a80d1 /lib/gitlab/git
parent69fd4f948686f2d0381d5690ac5dbd6e4e411270 (diff)
Restore User.from_gitaly
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r--lib/gitlab/git/user.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/git/user.rb b/lib/gitlab/git/user.rb
index cb1af5f3b7c..da74719ae87 100644
--- a/lib/gitlab/git/user.rb
+++ b/lib/gitlab/git/user.rb
@@ -7,6 +7,11 @@ module Gitlab
new(gitlab_user.username, gitlab_user.name, gitlab_user.email, Gitlab::GlId.gl_id(gitlab_user))
end
+ # TODO support the username field in Gitaly https://gitlab.com/gitlab-org/gitaly/issues/628
+ def self.from_gitaly(gitaly_user)
+ new('', gitaly_user.name, gitaly_user.email, gitaly_user.gl_id)
+ end
+
def initialize(username, name, email, gl_id)
@username = username
@name = name