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