diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-16 15:33:11 +0200 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-06-20 14:48:28 -0500 |
commit | 483dc62eaac0e11717b5b103317c4441ec0ff23d (patch) | |
tree | 40b5954f0f5f0f181d3fa73ec36cd1492d2e0669 /lib/api/templates.rb | |
parent | 96ae6099dd5921ae32139a206d598043520fb506 (diff) | |
download | gitlab-ce-483dc62eaac0e11717b5b103317c4441ec0ff23d.tar.gz |
Incorporate review
Diffstat (limited to 'lib/api/templates.rb')
-rw-r--r-- | lib/api/templates.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/templates.rb b/lib/api/templates.rb index 9f5f10a5088..33cbb0c9e1b 100644 --- a/lib/api/templates.rb +++ b/lib/api/templates.rb @@ -2,7 +2,7 @@ module API class Templates < Grape::API TEMPLATE_TYPES = { gitignores: Gitlab::Template::Gitignore, - gitlab_ci_ymls: Gitlab::Template::GitlabCIYml + gitlab_ci_ymls: Gitlab::Template::GitlabCiYml }.freeze TEMPLATE_TYPES.each do |template, klass| @@ -29,6 +29,10 @@ module API new_template = klass.find(params[:name]) not_found!("#{template.to_s.singularize}") unless new_template + if new_template.class == Gitlab::Template::GitlabCiYml + new_template.content = "# This file is a template, and might need editing before it works on your project.\n" + new_template.content + end + present new_template, with: Entities::Template end end |