summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2019-03-18 17:51:11 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2019-03-26 13:21:03 +0100
commitd36415b7545fff543f08a5175790e3a92f383475 (patch)
treeb88dfef2992af721191b790ac7a5bc6f1b9eb90b /app/workers
parentd64452ebfc262cfc1324fcaf116e74bc436413d3 (diff)
downloadgitlab-ce-d36415b7545fff543f08a5175790e3a92f383475.tar.gz
Allow multiple repositories per project
This changes the repository type from a binary `wiki?` to a type. So we can have more than 2 repository types. Now everywhere we called `.wiki?` and expected a boolean, we check that type.
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/post_receive.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb
index bbd4ab159e4..02cdf8b068d 100644
--- a/app/workers/post_receive.rb
+++ b/app/workers/post_receive.rb
@@ -4,7 +4,7 @@ class PostReceive
include ApplicationWorker
def perform(gl_repository, identifier, changes, push_options = [])
- project, is_wiki = Gitlab::GlRepository.parse(gl_repository)
+ project, repo_type = Gitlab::GlRepository.parse(gl_repository)
if project.nil?
log("Triggered hook for non-existing project with gl_repository \"#{gl_repository}\"")
@@ -17,7 +17,7 @@ class PostReceive
Sidekiq.logger.info "changes: #{changes.inspect}" if ENV['SIDEKIQ_LOG_ARGUMENTS']
post_received = Gitlab::GitPostReceive.new(project, identifier, changes, push_options)
- if is_wiki
+ if repo_type.wiki?
process_wiki_changes(post_received)
else
process_project_changes(post_received)