From d64090b8a9065746c6d532057228c079a1d57013 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 11 Feb 2013 19:16:59 +0200 Subject: No gitolite in project any more --- app/workers/post_receive.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/workers/post_receive.rb') diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb index 6e2d0e7aba2..e3f62d736ef 100644 --- a/app/workers/post_receive.rb +++ b/app/workers/post_receive.rb @@ -5,10 +5,10 @@ class PostReceive def perform(repo_path, oldrev, newrev, ref, identifier) - if repo_path.start_with?(Gitlab.config.gitolite.repos_path.to_s) - repo_path.gsub!(Gitlab.config.gitolite.repos_path.to_s, "") + if repo_path.start_with?(Gitlab.config.gitlab_shell.repos_path.to_s) + repo_path.gsub!(Gitlab.config.gitlab_shell.repos_path.to_s, "") else - Gitlab::GitLogger.error("POST-RECEIVE: Check gitlab.yml config for correct gitolite.repos_path variable. \"#{Gitlab.config.gitolite.repos_path}\" does not match \"#{repo_path}\"") + Gitlab::GitLogger.error("POST-RECEIVE: Check gitlab.yml config for correct gitlab_shell.repos_path variable. \"#{Gitlab.config.gitlab_shell.repos_path}\" does not match \"#{repo_path}\"") end repo_path.gsub!(/.git$/, "") @@ -22,7 +22,8 @@ class PostReceive end # Ignore push from non-gitlab users - user = if identifier.eql? Gitlab.config.gitolite.admin_key + user = if identifier.nil? + raise identifier.inspect email = project.repository.commit(newrev).author.email rescue nil User.find_by_email(email) if email elsif /^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier) -- cgit v1.2.3