Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-06-30 11:53:14 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-06-30 11:53:14 +0300
commit2d33952790ca07893f110ee1c46afcbce4da384b (patch)
tree1c799d26826fafec86a406fb128d623fc32bf249 /app
parent3e93ddffd884b6f60e31dee724bcb38e415782fb (diff)
parentf4e6aba1bbeca043a29b4903cef2f5b99a1faac3 (diff)
Merge branch '34502-gitlab-git-hook-should-set-the-gl_repository-environment-variable' into 'master'
Set the GL_REPOSITORY env variable on Gitlab::Git::Hook Closes #34502 See merge request !12572
Diffstat (limited to 'app')
-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|