summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-06-29 15:22:40 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-06-29 15:22:40 -0400
commitf4e6aba1bbeca043a29b4903cef2f5b99a1faac3 (patch)
tree44a69ea3eba402594c0a1567459f969834d4d82c /app/services
parent6205e45727db4d6720b7c3dc6ce010872b4f1628 (diff)
downloadgitlab-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.rb6
-rw-r--r--app/services/git_operation_service.rb2
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|