Commit 6f7ccea6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix satellites to use filesystem. Correct post-receive user finder

parent 896c3a0a
...@@ -28,10 +28,13 @@ class PostReceive ...@@ -28,10 +28,13 @@ class PostReceive
elsif /^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier) elsif /^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier)
User.find_by_email(identifier) User.find_by_email(identifier)
else else
Key.find_by_identifier(identifier).try(:user) User.find_by_username(identifier.strip)
end end
return false unless user unless user
Gitlab::GitLogger.error("POST-RECEIVE: Triggered hook for non-existing user \"#{identifier} \"")
return false
end
project.trigger_post_receive(oldrev, newrev, ref, user) project.trigger_post_receive(oldrev, newrev, ref, user)
end end
......
...@@ -30,10 +30,10 @@ module Gitlab ...@@ -30,10 +30,10 @@ module Gitlab
end end
def create def create
output, status = popen("git clone #{project.url_to_repo} #{path}", output, status = popen("git clone #{project.repository.path_to_repo} #{path}",
Gitlab.config.satellites.path) Gitlab.config.satellites.path)
log("PID: #{project.id}: git clone #{project.url_to_repo} #{path}") log("PID: #{project.id}: git clone #{project.repository.path_to_repo} #{path}")
log("PID: #{project.id}: -> #{output}") log("PID: #{project.id}: -> #{output}")
if status.zero? if status.zero?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment