at 18.09-beta 29 lines 1.0 kB view raw
1--- a/app/workers/post_receive.rb 2+++ b/app/workers/post_receive.rb 3@@ -3,7 +3,9 @@ class PostReceive 4 include DedicatedSidekiqQueue 5 6 def perform(gl_repository, identifier, changes) 7- project, is_wiki = Gitlab::GlRepository.parse(gl_repository) 8+ # XXX: https://gitlab.com/gitlab-org/gitlab-ce/issues/36783 9+ # project, is_wiki = Gitlab::GlRepository.parse(gl_repository) 10+ project, is_wiki = parse_project_identifier(gl_repository) 11 12 if project.nil? 13 log("Triggered hook for non-existing project with gl_repository \"#{gl_repository}\"") 14@@ -59,6 +61,15 @@ class PostReceive 15 # Nothing defined here yet. 16 end 17 18+ # XXX: https://gitlab.com/gitlab-org/gitlab-ce/issues/36783 19+ def parse_project_identifier(project_identifier) 20+ if project_identifier.start_with?('/') 21+ Gitlab::RepoPath.parse(project_identifier) 22+ else 23+ Gitlab::GlRepository.parse(project_identifier) 24+ end 25+ end 26+ 27 def log(message) 28 Gitlab::GitLogger.error("POST-RECEIVE: #{message}") 29 end