Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-18 00:50:18 +0300
committerStan Hu <stanhu@gmail.com>2019-02-06 08:33:10 +0300
commitb103f61450a0553a4a266bd394ae6d6f3c4d10b1 (patch)
tree8b32b44c235e45bc89b74f23844d3c1b89ab861b /lib/gitlab
parent1af22dbe5c4dad1217199ac5e9282dbe26d39aca (diff)
Add convenience methods for creating project and Wiki repositories
This makes it easier to access other project arguments in the future.
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/shell.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index c8d891500d7..9f2de59684c 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -64,6 +64,14 @@ module Gitlab
end
end
+ def create_project_repository(project)
+ create_repository(project.repository_storage, project.disk_path, project.full_path)
+ end
+
+ def create_wiki_repository(project)
+ create_repository(project.repository_storage, project.wiki.disk_path, project.wiki.full_path)
+ end
+
# Init new repository
#
# storage - the shard key