diff options
author | David Turner <novalis@novalis.org> | 2017-08-03 14:47:39 -0400 |
---|---|---|
committer | David Turner <novalis@novalis.org> | 2017-09-28 15:45:29 -0400 |
commit | 2f92f124d1297ea58935f37609b7e2b0709e64d3 (patch) | |
tree | 8dfcf7c50c962fa9743eb8a19c70ad2d2298daba /lib/gitlab_access_status.rb | |
parent | bee2bcc5546031aa66d0a3e028bb709282275254 (diff) | |
download | gitlab-shell-2f92f124d1297ea58935f37609b7e2b0709e64d3.tar.gz |
pass gl_username through to hooks
Diffstat (limited to 'lib/gitlab_access_status.rb')
-rw-r--r-- | lib/gitlab_access_status.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/gitlab_access_status.rb b/lib/gitlab_access_status.rb index 988ff7a..69d914e 100644 --- a/lib/gitlab_access_status.rb +++ b/lib/gitlab_access_status.rb @@ -1,12 +1,13 @@ require 'json' class GitAccessStatus - attr_reader :message, :gl_repository, :repository_path, :gitaly, :geo_node + attr_reader :message, :gl_repository, :gl_username, :repository_path, :gitaly, :geo_node - def initialize(status, message, gl_repository, repository_path, gitaly, geo_node = false) + def initialize(status, message, gl_repository:, gl_username:, repository_path:, gitaly:, geo_node:) @status = status @message = message @gl_repository = gl_repository + @gl_username = gl_username @repository_path = repository_path @gitaly = gitaly @geo_node = geo_node @@ -16,10 +17,11 @@ class GitAccessStatus values = JSON.parse(json) self.new(values["status"], values["message"], - values["gl_repository"], - values["repository_path"], - values["gitaly"], - values["geo_node"]) + gl_repository: values["gl_repository"], + gl_username: values["gl_username"], + repository_path: values["repository_path"], + gitaly: values["gitaly"], + geo_node: values["geo_node"]) end def allowed? |