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:
Diffstat (limited to 'lib/gitlab/changelog/release.rb')
-rw-r--r--lib/gitlab/changelog/release.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/gitlab/changelog/release.rb b/lib/gitlab/changelog/release.rb
index f2a01c2b0dc..c0b6a5c5679 100644
--- a/lib/gitlab/changelog/release.rb
+++ b/lib/gitlab/changelog/release.rb
@@ -54,7 +54,7 @@ module Gitlab
end
def to_markdown
- state = EvalState.new
+ state = TemplateParser::EvalState.new
data = { 'categories' => entries_for_template }
# While not critical, we would like release sections to be separated by
@@ -63,7 +63,12 @@ module Gitlab
#
# Since it can be a bit tricky to get this right in a template, we
# enforce an empty line separator ourselves.
- markdown = @config.template.evaluate(state, data).strip
+ markdown =
+ begin
+ @config.template.evaluate(state, data).strip
+ rescue TemplateParser::ParseError => e
+ raise Error, e.message
+ end
# The release header can't be changed using the Liquid template, as we
# need this to be in a known format. Without this restriction, we won't