From 26f3731021e8c5c6417fe874c53a5bf2065b8888 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Wed, 28 Jun 2017 10:42:59 -0300 Subject: Add ProjectWiki#ensure_repository --- app/models/project_wiki.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/project_wiki.rb') diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index f38fbda7839..f26ee57510c 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -149,6 +149,10 @@ class ProjectWiki wiki end + def ensure_repository + create_repo! unless repository_exists? + end + def hook_attrs { web_url: web_url, -- cgit v1.2.1