summaryrefslogtreecommitdiff
path: root/lib/gitlab_config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_config.rb')
-rw-r--r--lib/gitlab_config.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb
index f8a10cf..a51a32c 100644
--- a/lib/gitlab_config.rb
+++ b/lib/gitlab_config.rb
@@ -19,6 +19,13 @@ class GitlabConfig
@config['secret_file'] ||= File.join(ROOT_PATH, '.gitlab_shell_secret')
end
+ # Pass a default value because this is called from a repo's context; in which
+ # case, the repo's hooks directory should be the default.
+ #
+ def custom_hooks_dir(default: nil)
+ @config['custom_hooks_dir'] || default
+ end
+
def gitlab_url
(@config['gitlab_url'] ||= "http://localhost:8080").sub(%r{/*$}, '')
end