diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_shell.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index b38fefe..0221624 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -18,7 +18,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength API_COMMANDS = %w(2fa_recovery_codes).freeze GL_PROTOCOL = 'ssh'.freeze - attr_accessor :key_id, :gl_repository, :repo_name, :command, :git_access, :username + attr_accessor :key_id, :gl_repository, :repo_name, :command, :git_access attr_reader :repo_path def initialize(key_id) @@ -197,7 +197,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength end def username - user && user['name'] || 'Anonymous' + @username ||= user && user['username'] || 'Anonymous' end # User identifier to be used in log messages. |