summaryrefslogtreecommitdiff
path: root/lib/gitlab_shell.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-02-16 07:04:15 -0800
committerStan Hu <stanhu@gmail.com>2019-02-16 07:39:14 -0800
commitebedab837012f844a47645f86412d3ec69aa2b4b (patch)
treeb27923bdc960d088901a97263ba75e868dbec0fb /lib/gitlab_shell.rb
parent015ff88ade79910d5c3dd7505b89a0659f2d6b24 (diff)
downloadgitlab-shell-sh-use-gl-project-path.tar.gz
Add support for using gl_project_pathsh-use-gl-project-path
This will enable us to track the human-readable project path with SSH access in gitlab-shell. Currently the Gitaly logs will only show the hashed storage and gl_repository path (e.g. project-1234).
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r--lib/gitlab_shell.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index c1bb976..2cb76a8 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -27,7 +27,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
TWO_FACTOR_RECOVERY_COMMAND = '2fa_recovery_codes'
GL_PROTOCOL = 'ssh'
- attr_accessor :gl_id, :gl_repository, :repo_name, :command, :git_access, :git_protocol
+ attr_accessor :gl_id, :gl_repository, :gl_project_path, :repo_name, :command, :git_access, :git_protocol
def initialize(who)
who_sym, = GitlabNet.parse_who(who)
@@ -58,6 +58,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
@gl_repository = access_status.gl_repository
@git_protocol = ENV['GIT_PROTOCOL']
+ @gl_project_path = access_status.gl_project_path
@gitaly = access_status.gitaly
@username = access_status.gl_username
@git_config_options = access_status.git_config_options
@@ -167,6 +168,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
args = JSON.dump(
'repository' => @gitaly['repository'],
'gl_repository' => @gl_repository,
+ 'gl_project_path' => @gl_project_path,
'gl_id' => @gl_id,
'gl_username' => @username,
'git_config_options' => @git_config_options,