diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-06-29 15:22:40 -0400 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-06-29 15:22:40 -0400 |
commit | f4e6aba1bbeca043a29b4903cef2f5b99a1faac3 (patch) | |
tree | 44a69ea3eba402594c0a1567459f969834d4d82c /app/services | |
parent | 6205e45727db4d6720b7c3dc6ce010872b4f1628 (diff) | |
download | gitlab-ce-f4e6aba1bbeca043a29b4903cef2f5b99a1faac3.tar.gz |
Set the GL_REPOSITORY env variable on Gitlab::Git::Hook34502-gitlab-git-hook-should-set-the-gl_repository-environment-variable
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/git_hooks_service.rb | 6 | ||||
-rw-r--r-- | app/services/git_operation_service.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/services/git_hooks_service.rb b/app/services/git_hooks_service.rb index d222d1e63aa..eab65d09299 100644 --- a/app/services/git_hooks_service.rb +++ b/app/services/git_hooks_service.rb @@ -3,8 +3,8 @@ class GitHooksService attr_accessor :oldrev, :newrev, :ref - def execute(user, repo_path, oldrev, newrev, ref) - @repo_path = repo_path + def execute(user, project, oldrev, newrev, ref) + @project = project @user = Gitlab::GlId.gl_id(user) @oldrev = oldrev @newrev = newrev @@ -26,7 +26,7 @@ class GitHooksService private def run_hook(name) - hook = Gitlab::Git::Hook.new(name, @repo_path) + hook = Gitlab::Git::Hook.new(name, @project) hook.trigger(@user, oldrev, newrev, ref) end end diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb index ed6ea638235..43636fde0be 100644 --- a/app/services/git_operation_service.rb +++ b/app/services/git_operation_service.rb @@ -120,7 +120,7 @@ class GitOperationService def with_hooks(ref, newrev, oldrev) GitHooksService.new.execute( user, - repository.path_to_repo, + repository.project, oldrev, newrev, ref) do |service| |